<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class State
 * @package App\Models
 *
 * @property \App\Models\Country country_id
 * @property string name
 */
class State extends AbstractModel
{
    use SoftDeletes;

    protected $table = 'states';

    protected $dates = ['deleted_at'];

    /**
     * @return HasOne
     */
    public function country(): HasOne
    {
        return $this->hasOne(Country::class, 'country_id', 'id');
    }
}
