belongsTo(TeacherProfile::class, 'teacher_id'); } /** * The subject being taught. */ public function subject(): BelongsTo { return $this->belongsTo(Subject::class, 'subject_id'); } /** * Where the session takes place (room, online, etc.) */ public function location(): BelongsTo { return $this->belongsTo(Location::class, 'location_id'); } /** * Students assigned to this arrangement. */ public function students(): HasMany { return $this->hasMany(TeachingArrangementStudent::class, 'teaching_arrangement_id'); } /** * Attendance records generated from this arrangement. */ public function attendance(): HasMany { return $this->hasMany(LessonAttendance::class, 'teaching_arrangement_id'); } }