<?php

namespace Modules\User\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Modules\Area\Models\Area;
use Modules\City\Models\City;
use Modules\Country\Models\Country;
use Modules\Region\Models\Region;

class Address extends Model
{
    use SoftDeletes;

    protected $fillable = ['user_name','phone','address','latitude','longitude','user_status','delivery_status','user_id','country_id','region_id','city_id'];

    public function country()
    {
        return $this->belongsTo(Country::class)->withTrashed();
    }
    public function region()
    {
        return $this->belongsTo(Region::class)->withTrashed();
    }
    public function area()
    {
        return $this->belongsTo(Area::class)->withTrashed();
    }
    public function city()
    {
        return $this->belongsTo(City::class)->withTrashed();
    }
}
