<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class City extends Model
{
    protected $fillable = [
        'state_id', 'name', 'code', 'planning_authority',
        'dcr_version', 'master_plan_year', 'is_active',
    ];

    protected $casts = [
        'is_active' => 'boolean',
        'master_plan_year' => 'integer',
    ];

    public function state()
    {
        return $this->belongsTo(State::class);
    }

    public function zones()
    {
        return $this->hasMany(Zone::class);
    }

    public function zoneRules()
    {
        return $this->hasMany(ZoneRule::class);
    }

    public function feasibilityReports()
    {
        return $this->hasMany(FeasibilityReport::class);
    }
}
