Files
alrahma_sunday_school_api/app/Models/ParentMeetingSchedule.php
T
2026-06-09 01:25:14 -04:00

54 lines
1.2 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',
];
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');
}
}