<?php

namespace App\Models\Master;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Kabupaten extends Model
{
    use HasFactory;

    protected $table = 'ms_kabupaten';
    protected $primaryKey = 'MsKabupatenId';

    protected $fillable = [
        'ms_provinsi_id',
        'name',
        'kode_wilayah',
    ];

    public function provinsi()
    {
        return $this->belongsTo('\App\Models\Master\Provinsi','ms_provinsi_id','MsProvinsiId');
    }
}
