using Core.Entities;
namespace Core.Calculation;
///
/// Represents a single time slot in the team meeting schedule.
///
public class TeamScheduleTimeSlot
{
///
/// Gets or sets the name of this time slot.
///
public string Name { get; set; } = null!;
///
/// Gets or sets the teams scheduled in this time slot.
///
public Team[] Teams = null!;
///
/// Gets or sets the students who are not scheduled in any team during this time slot.
///
public Student[] UnscheduledStudents = null!;
///
/// Gets or sets the students who have overlapping team meetings in this time slot.
///
public IEnumerable<(Student student, IEnumerable teams)> StudentOverlaps = null!;
///
/// Checks if a student has overlapping team meetings in this time slot.
///
/// The student to check
/// True if the student has overlaps, otherwise false
public bool StudentHasOverlaps(Student student)
{
return StudentOverlaps.Any(o => o.student.Equals(student));
}
}