<?php

namespace Mehrab\City\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Mehrab\Region\Models\Region;

class City extends Model
{
    use HasFactory;

    const ACTIVE = 'active';
    const INACTIVE = 'inactive';
    public static $status = [self::ACTIVE,self::INACTIVE];

    protected $fillable = [
        'name',
        'slug',
        'priority'
    ];

    public function regions(){
        return $this->hasMany(Region::class,'city_id');
    }


}
