e13df69885
API CI/CD / Validate (composer + pint) (push) Successful in 3m6s
API CI/CD / Test (PHPUnit) (push) Failing after 4m53s
API CI/CD / Build frontend assets (push) Successful in 1m2s
API CI/CD / Security audit (push) Failing after 59s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
41 lines
1.1 KiB
PHP
41 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class ParentMeetingSchedule extends BaseModel
|
|
{
|
|
protected $table = 'parent_meeting_schedules';
|
|
|
|
// ✅ legacy: useTimestamps = true (created_at/updated_at)
|
|
public $timestamps = true;
|
|
|
|
protected $fillable = ['student_id', 'parent_user_id', 'parent_name', 'student_name', 'class_section_name', 'date', 'time', 'notes', 'semester', 'school_year', 'status', 'created_by', 'created_at', 'updated_at'];
|
|
|
|
protected $casts = [
|
|
'student_id' => 'integer',
|
|
'parent_user_id' => 'integer',
|
|
'created_by' => 'integer',
|
|
|
|
// if these are DATE/TIME columns:
|
|
'date' => 'date',
|
|
// time is typically stored as TIME or string; keep as string unless DATETIME
|
|
'time' => 'string',
|
|
];
|
|
|
|
/* Optional relationships */
|
|
public function student()
|
|
{
|
|
return $this->belongsTo(Student::class, 'student_id');
|
|
}
|
|
|
|
public function parent()
|
|
{
|
|
return $this->belongsTo(User::class, 'parent_user_id');
|
|
}
|
|
|
|
public function creator()
|
|
{
|
|
return $this->belongsTo(User::class, 'created_by');
|
|
}
|
|
}
|