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
+30 -3
View File
@@ -2,11 +2,22 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models\BaseModel;
class Exam extends Model
class Exam extends BaseModel
{
protected $table = 'exams';
/**
* Your CI model only uses created_at (updatedField = '').
* In Laravel, easiest is to disable timestamps and manage created_at yourself OR
* enable timestamps but disable UPDATED_AT.
*
* We'll keep auto created_at, no updated_at:
*/
public $timestamps = false;
const UPDATED_AT = null; // ✅ no updated_at column
protected $fillable = [
'student_id',
'student_school_id',
@@ -14,5 +25,21 @@ class Exam extends Model
'exam_name',
'created_at',
];
public $timestamps = false;
protected $casts = [
'student_id' => 'integer',
'school_id' => 'integer',
'class_section_id' => 'integer',
];
/* Optional relationships */
public function student()
{
return $this->belongsTo(Student::class, 'student_id');
}
public function classSection()
{
return $this->belongsTo(ClassSection::class, 'class_section_id');
}
}