This commit is contained in:
@@ -3,17 +3,25 @@
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
use App\Models\Concerns\SchoolYearAutoFillTrait;
|
||||
|
||||
class ClassModel extends Model
|
||||
{
|
||||
use SchoolYearAutoFillTrait;
|
||||
|
||||
protected $table = 'classes'; // The table name
|
||||
protected $primaryKey = 'id'; // The correct primary key for the classes table
|
||||
|
||||
// Fields that are allowed to be manipulated.
|
||||
protected $allowedFields = [
|
||||
'class_name',
|
||||
'schedule',
|
||||
'capacity'
|
||||
]; // Fields that are allowed to be manipulated
|
||||
'capacity',
|
||||
'school_year',
|
||||
];
|
||||
protected $validationRules = [
|
||||
'school_year' => 'required|string|max_length[9]',
|
||||
];
|
||||
|
||||
protected $useTimestamps = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user