32 lines
676 B
PHP
32 lines
676 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class ClassPreparationLog extends BaseModel
|
|
{
|
|
protected $table = 'class_preparation_log';
|
|
|
|
// legacy: useTimestamps = false
|
|
public $timestamps = true;
|
|
|
|
protected $fillable = [
|
|
'class_section_id',
|
|
'class_section',
|
|
'school_year',
|
|
'prep_data',
|
|
'created_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'class_section_id' => 'integer',
|
|
// If prep_data is JSON in DB, use 'array' (or 'json') cast:
|
|
'prep_data' => 'array',
|
|
];
|
|
|
|
// Optional relationship
|
|
public function classSection()
|
|
{
|
|
return $this->belongsTo(ClassSection::class, 'class_section_id');
|
|
}
|
|
}
|