<?php

namespace App\Models;

use CodeIgniter\Model;

class EarlyDismissalSignatureModel extends Model
{
    protected $table            = 'early_dismissal_signatures';
    protected $primaryKey       = 'id';
    protected $useAutoIncrement = true;

    protected $useTimestamps = true;
    protected $createdField  = 'created_at';
    protected $updatedField  = 'updated_at';

    protected $allowedFields = [
        'report_date',
        'school_year',
        'semester',
        'filename',
        'original_name',
        'mime_type',
        'file_size',
        'uploaded_by',
    ];

    protected $validationRules = [
        'report_date' => 'required|valid_date[Y-m-d]',
        'filename'    => 'required|string',
        'school_year' => 'permit_empty|string',
        'semester'    => 'permit_empty|string',
    ];
}
