<?php

namespace App\Models\Penduduk;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\Wilayah\DesaKelurahan;
use App\Models\Pertanian\Adat;

class Keluarga extends Model
{
    use SoftDeletes; 

    protected $table = 'keluarga';

    protected $fillable = [
        'kk',
        'adat_id',
        'desa_kelurahan_id',
        'path_kk',
        'file_kk',
        'created_by',
        'updated_by',
        'deleted_by',
    ]; 

    public function desakelurahan()
    {
        return $this->belongsTo(DesaKelurahan::class, 'desa_kelurahan_id');
    }

    public function adat()
    {
        return $this->belongsTo(Adat::class, 'adat_id');
    }
}
