<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\MorphTo;

class Address extends BaseAuditable
{
    protected $appends = ['fullAddress'];

    public function attachable(): MorphTo
    {
        return $this->morphTo();
    }

    public function getFullAddressAttribute(): string
    {
        return "{$this->postCode} {$this->city} {$this->street}";

        return $this->postCode.' '.$this->city.' '.$this->street;
    }
}
