Files
2025-12-26 13:58:41 -05:00

39 lines
1.2 KiB
C#

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