Files
alrahma_sunday_school/app/Models/StudentYearStatusModel.php
root 889c037660
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 48s
Tests / PHPUnit (push) Failing after 1m22s
fix is_new issue with enrollment fixes
2026-08-20 19:57:25 -04:00

31 lines
778 B
PHP

<?php
namespace App\Models;
use App\Models\Concerns\SchoolYearAutoFillTrait;
use CodeIgniter\Model;
class StudentYearStatusModel extends Model
{
use SchoolYearAutoFillTrait;
protected $table = 'student_year_status';
protected $primaryKey = 'id';
protected $returnType = 'array';
protected $useAutoIncrement = true;
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
protected $allowedFields = [
'student_id',
'school_year',
'is_new',
];
protected $validationRules = [
'student_id' => 'required|is_natural_no_zero',
'school_year' => 'required|regex_match[/^\d{4}-\d{4}$/]',
'is_new' => 'required|in_list[0,1]',
];
}