reconstruction of the project
This commit is contained in:
@@ -2,11 +2,15 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\BaseModel;
|
||||
|
||||
class ClassPrepAdjustment extends Model
|
||||
class ClassPrepAdjustment extends BaseModel
|
||||
{
|
||||
protected $table = 'class_prep_adjustments';
|
||||
|
||||
// CI model didn't use timestamps; keep off unless your table has updated_at/created_at auto-managed.
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'class_section_id',
|
||||
'item_name',
|
||||
@@ -15,5 +19,15 @@ class ClassPrepAdjustment extends Model
|
||||
'school_year',
|
||||
'created_at',
|
||||
];
|
||||
public $timestamps = false;
|
||||
|
||||
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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user