belongsTo(StudentProfile::class, 'student_id'); } /** * The teacher assigned to this student for this subject. */ public function teacher(): BelongsTo { return $this->belongsTo(TeacherProfile::class, 'teacher_id'); } /** * The subject being taught. */ public function subject(): BelongsTo { return $this->belongsTo(Subject::class, 'subject_id'); } /** * Teaching arrangements (sessions/timetabled slots) * linking this student–teacher subject pair to actual classes. */ public function teachingArrangements(): HasMany { return $this->hasMany(TeachingArrangementStudent::class); } /** * Attendance records for this student–teacher–subject combination. */ public function attendance(): HasMany { return $this->hasMany(LessonAttendance::class); } }