This commit is contained in:
@@ -3,9 +3,12 @@
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
use App\Models\Concerns\SchoolYearAutoFillTrait;
|
||||
|
||||
class NotificationModel extends Model
|
||||
{
|
||||
use SchoolYearAutoFillTrait;
|
||||
|
||||
protected $table = 'notifications';
|
||||
protected $primaryKey = 'id';
|
||||
protected $allowedFields = [
|
||||
@@ -20,8 +23,13 @@ class NotificationModel extends Model
|
||||
'expires_at',
|
||||
'sent_at',
|
||||
'scheduled_at',
|
||||
'deleted_at'
|
||||
'deleted_at',
|
||||
'school_year',
|
||||
];
|
||||
protected $validationRules = [
|
||||
'school_year' => 'required|string|max_length[20]',
|
||||
];
|
||||
|
||||
protected $useTimestamps = true;
|
||||
protected $createdField = 'created_at';
|
||||
protected $updatedField = 'updated_at';
|
||||
|
||||
Reference in New Issue
Block a user