<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class UserDetail extends Model
{
    use HasFactory, SoftDeletes;
    protected $table = 'user_details';
    public $timestamps = true;
    protected $guarded = [];

    public function countryName(){
    	return $this->hasOne('App\Models\Country', 'country_id', 'country_id');
    }
    public function stateName(){
    	return $this->hasOne('App\Models\StateList', 'state_id', 'state_id');
    }
    public function cityName(){
    	return $this->hasOne('App\Models\CityList', 'city_id', 'city_id');
    }
    public function reportUser(){
    	return $this->hasOne('App\Models\User', 'id', 'reporting_user_id');
    }
}
