fix is_new issue with enrollment fixes
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?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]',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user