reconstruction of the project

This commit is contained in:
root
2026-03-08 16:33:24 -04:00
parent 23b7db1107
commit c8de5f7edc
9157 changed files with 77877 additions and 1073823 deletions
+35 -3
View File
@@ -2,11 +2,15 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models\BaseModel;
class PlacementScore extends Model
class PlacementScore extends BaseModel
{
protected $table = 'placement_scores';
// ✅ CI: useTimestamps = true (created_at/updated_at)
public $timestamps = true;
protected $fillable = [
'batch_id',
'student_id',
@@ -16,5 +20,33 @@ class PlacementScore extends Model
'created_at',
'updated_at',
];
public $timestamps = true;
protected $casts = [
'batch_id' => 'integer',
'student_id' => 'integer',
'score' => 'decimal:2', // change to 'integer' if score is whole number
'created_by' => 'integer',
'updated_by' => 'integer',
];
/* Optional relationships */
public function batch()
{
return $this->belongsTo(PlacementBatch::class, 'batch_id');
}
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');
}
}