This commit is contained in:
@@ -3,9 +3,12 @@
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
use App\Models\Concerns\SchoolYearAutoFillTrait;
|
||||
|
||||
class ParentNotificationModel extends Model
|
||||
{
|
||||
use SchoolYearAutoFillTrait;
|
||||
|
||||
protected $table = 'parent_notifications';
|
||||
protected $primaryKey = 'id';
|
||||
protected $useTimestamps = true;
|
||||
@@ -16,6 +19,10 @@ class ParentNotificationModel extends Model
|
||||
'student_id','code','incident_date','channel','to_address','subject',
|
||||
'status','response','semester','school_year'
|
||||
];
|
||||
protected $validationRules = [
|
||||
'school_year' => 'required|string|max_length[9]',
|
||||
];
|
||||
|
||||
|
||||
public function hasSent(int $studentId, string $code, string $incidentYmd, string $channel='email', ?string $to=null): bool
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user