<?php

declare(strict_types=1);

namespace App\Models\Barangay;

use App\Models\Model;

class HouseholdMember extends Model
{
    protected ?string $table = 'barangay_household_members';

    protected array $fillable = [
        'household_id', 'resident_id', 'relationship_to_head', 'is_active',
    ];

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

    public function household()
    {
        return $this->belongsTo(Household::class, 'household_id');
    }

    public function resident()
    {
        return $this->belongsTo(Resident::class, 'resident_id');
    }
}
