<?php

declare(strict_types=1);

namespace App\Models\Barangay;

use App\Models\Model;

class BlotterHearing extends Model
{
    protected ?string $table = 'barangay_blotter_hearings';

    protected array $fillable = [
        'blotter_id', 'hearing_date', 'status', 'officer_id',
        'notes', 'resolution', 'next_hearing_date',
    ];

    protected array $casts = [
        'hearing_date'      => 'datetime',
        'next_hearing_date' => 'datetime',
    ];

    public function blotter()
    {
        return $this->belongsTo(Blotter::class, 'blotter_id');
    }

    public function officer()
    {
        return $this->belongsTo(\App\Models\User::class, 'officer_id');
    }
}
