38 lines
907 B
PHP
38 lines
907 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use CodeIgniter\Model;
|
|
|
|
class ExamDraftModel extends Model
|
|
{
|
|
protected $table = 'exam_drafts';
|
|
protected $primaryKey = 'id';
|
|
protected $allowedFields = [
|
|
'teacher_id',
|
|
'class_section_id',
|
|
'semester',
|
|
'school_year',
|
|
'exam_type',
|
|
'draft_title',
|
|
'description',
|
|
'teacher_file',
|
|
'teacher_filename',
|
|
'status',
|
|
'admin_id',
|
|
'is_legacy',
|
|
'admin_comments',
|
|
'reviewed_at',
|
|
'final_file',
|
|
'final_filename',
|
|
'final_pdf_file',
|
|
'version',
|
|
'previous_draft_id',
|
|
];
|
|
protected $returnType = 'array';
|
|
protected $useTimestamps = true;
|
|
protected $createdField = 'created_at';
|
|
protected $updatedField = 'updated_at';
|
|
protected bool $updateOnlyChanged = false; // force updates even if CI thinks nothing changed
|
|
}
|