This commit is contained in:
@@ -2,9 +2,12 @@
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
use App\Models\Concerns\SchoolYearAutoFillTrait;
|
||||
|
||||
class ClassSectionModel extends Model
|
||||
{
|
||||
use SchoolYearAutoFillTrait;
|
||||
|
||||
protected $table = 'classSection'; // Correct table name
|
||||
protected $primaryKey = 'id'; // Specify the primary key field
|
||||
|
||||
@@ -14,7 +17,12 @@ class ClassSectionModel extends Model
|
||||
'class_section_name',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'school_year',
|
||||
];
|
||||
protected $validationRules = [
|
||||
'school_year' => 'required|string|max_length[9]',
|
||||
];
|
||||
|
||||
|
||||
protected $useTimestamps = true;
|
||||
protected $createdField = 'created_at';
|
||||
|
||||
Reference in New Issue
Block a user