<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class State extends Model
{
    protected $fillable = ['name', 'code', 'capital', 'regulatory_body', 'notes', 'is_active'];

    public function cities()
    {
        return $this->hasMany(City::class);
    }

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

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

    public function regulations()
    {
        return $this->hasMany(Regulation::class);
    }

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