Initial commit

This commit is contained in:
2026-04-12 06:24:30 +00:00
commit 007f107be6
213 changed files with 25576 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class StudentAcademicHistory extends Model
{
use HasFactory;
protected $fillable = [
'student_id',
'academic_year_id',
'department_id',
'class_id',
'status',
'start_date',
'end_date',
'notes',
'is_current',
];
protected function casts(): array
{
return [
'start_date' => 'date',
'end_date' => 'date',
'is_current' => 'boolean',
];
}
public function student(): BelongsTo
{
return $this->belongsTo(Student::class);
}
public function academicYear(): BelongsTo
{
return $this->belongsTo(AcademicYear::class);
}
public function department(): BelongsTo
{
return $this->belongsTo(Department::class);
}
public function classRoom(): BelongsTo
{
return $this->belongsTo(SchoolClass::class, 'class_id');
}
}