<?php

namespace App\Models;

use App\Models\Dictionary\Area;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\SoftDeletes;

class Responsible extends Model
{
    use SoftDeletes;
    const DEFAULT_SORT_BY = 'updated_at';
    protected $fillable = [
        'name',
        'phone',
    ];

    public function area(): HasOne
    {
        return $this->hasOne(Area::class, 'responsible_id', 'id');
    }
}
