<?php

namespace App\Models;

use App\Traits\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;

class TenantDocument extends Model
{
    use BelongsToTenant;

    protected $fillable = [
        'tenant_id',
        'document_type',
        'document_number',
        'issue_date',
        'expiry_date',
        'issued_by',
        'attachment_path',
        'remarks',
        'expiry_reminder_enabled',
    ];

    protected $casts = [
        'issue_date' => 'date',
        'expiry_date' => 'date',
        'expiry_reminder_enabled' => 'boolean',
    ];

    public function tenant()
    {
        return $this->belongsTo(Tenant::class);
    }
}
