Files
alrahma_sunday_school_api/app/Models/PlacementLevel.php
T
2026-06-08 23:45:55 -04:00

45 lines
907 B
PHP

<?php
namespace App\Models;
use App\Models\BaseModel;
class PlacementLevel extends BaseModel
{
protected $table = 'placement_levels';
// ✅ legacy: useTimestamps = true (created_at/updated_at)
public $timestamps = true;
protected $fillable = [
'student_id',
'level',
'school_year',
'created_by',
'updated_by',
'created_at',
'updated_at',
];
protected $casts = [
'student_id' => 'integer',
'created_by' => 'integer',
'updated_by' => 'integer',
];
/* Optional relationships */
public function student()
{
return $this->belongsTo(Student::class, 'student_id');
}
public function creator()
{
return $this->belongsTo(User::class, 'created_by');
}
public function updater()
{
return $this->belongsTo(User::class, 'updated_by');
}
}