32 lines
758 B
PHP
32 lines
758 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\BaseModel;
|
|
|
|
class ClassPrepAdjustment extends BaseModel
|
|
{
|
|
protected $table = 'class_prep_adjustments';
|
|
|
|
// legacy model didn't use timestamps; keep off unless your table has updated_at/created_at auto-managed.
|
|
public $timestamps = true;
|
|
|
|
protected $fillable = [
|
|
'class_section_id',
|
|
'item_name',
|
|
'adjustment',
|
|
'school_year',
|
|
'created_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'class_section_id' => 'integer',
|
|
'adjustment' => 'integer', // change to 'decimal:2' if it's not an int
|
|
];
|
|
|
|
// Optional relationship
|
|
public function classSection()
|
|
{
|
|
return $this->belongsTo(ClassSection::class, 'class_section_id');
|
|
}
|
|
} |