Files
alrahma_sunday_school/app/Models/AssignmentModel.php
T
root 84337e8a50
Tests / PHPUnit (push) Failing after 42s
fix test issues
2026-07-12 19:16:49 -04:00

54 lines
1.5 KiB
PHP

<?php
namespace App\Models;
use CodeIgniter\Model;
class AssignmentModel extends Model
{
protected $table = 'assignments';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = 'array';
protected $useSoftDeletes = false;
protected $protectFields = true;
protected $allowedFields = [
'title',
'description',
'due_date',
'class_id',
'teacher_id',
'student_id',
'created_at',
'updated_at',
];
protected bool $allowEmptyInserts = false;
protected bool $updateOnlyChanged = true;
protected $useTimestamps = true;
protected $dateFormat = 'datetime';
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
protected $deletedField = 'deleted_at';
protected $validationRules = [
'title' => 'required|string|max_length[255]',
'due_date' => 'required|valid_date',
'class_id' => 'required|integer',
'teacher_id' => 'required|integer',
];
protected $validationMessages = [];
protected $skipValidation = false;
protected $cleanValidationRules = true;
protected $allowCallbacks = true;
protected $beforeInsert = [];
protected $afterInsert = [];
protected $beforeUpdate = [];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
}