45edcf5e5f
This commit removes the obsolete EventAssignment class from Core.Entities and introduces new models in Core.Models, including AssignmentParameters, AssignmentRequirement, PartialTeam, and StudentEventStatistics. The changes enhance the organization of assignment-related data and improve the overall structure of the codebase. Additionally, several files have been updated to include references to the new Core.Models namespace, ensuring consistency across the application.
17 lines
564 B
C#
17 lines
564 B
C#
using Core.Entities;
|
|
|
|
namespace Core.Models;
|
|
|
|
public class PartialTeam : Team
|
|
{
|
|
public IList<Student> OmittedStudents { get; set; } = null!;
|
|
|
|
public override Team CloneWithOmittedStudents(IEnumerable<Student> studentsToOmit)
|
|
{
|
|
var remainingStudents = Students.Where(s => !studentsToOmit.Contains(s)).ToList();
|
|
var omittedStudents = OmittedStudents.Union(Students.Where(studentsToOmit.Contains)).Distinct().ToList();
|
|
return new PartialTeam{Identifier = Identifier, Event = Event, Students = remainingStudents, OmittedStudents = omittedStudents };
|
|
}
|
|
}
|
|
|