<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Division extends Model
{
    protected $table = 'pd_divisions';
    protected $fillable = ['name','slug','status'];
    protected $casts = ['status'=>'boolean'];

    public function districts(){ return $this->hasMany(District::class, 'division_id'); }
    public function scopeActive($q){ return $q->where('status',1); }
}