Refactor event assignment structure and introduce new models for assignment parameters and requirements

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.
This commit is contained in:
2026-01-10 18:36:52 -05:00
parent ecd6173a44
commit 45edcf5e5f
24 changed files with 39 additions and 15 deletions
+34
View File
@@ -0,0 +1,34 @@
using Core.Entities;
namespace Core.Models
{
public class AssignmentParameters(
int effortLowerBound = 6,
int effortUpperBound = 8,
int eventsLowerBound = 2,
int eventsUpperBound = 4,
int teamSizeLimit = 4,
bool limitTeamsToOne = true,
bool requireRegional = true,
bool requireOnSite = true)
{
public int EffortLowerBound { get; set; } = effortLowerBound;
public int EffortUpperBound { get; set; } = effortUpperBound;
public int EventsLowerBound { get; set; } = eventsLowerBound;
public int EventsUpperBound { get; set; } = eventsUpperBound;
public int TeamSizeLimit { get; set; } = teamSizeLimit;
public bool LimitTeamsToOne { get; set; } = limitTeamsToOne;
public bool RequireRegional { get; set; } = requireRegional;
public bool RequireOnSite { get; set; } = requireOnSite;
public override string ToString()
{
return $"Team Size Limit: {TeamSizeLimit}" + Environment.NewLine +
$"Require Regional: {RequireRegional}" + Environment.NewLine +
$"Require On-site: {RequireOnSite}" + Environment.NewLine +
$"Events Range: [{EventsLowerBound}-{EventsUpperBound}]" + Environment.NewLine +
$"Effort Range: [{EffortLowerBound}-{EffortUpperBound}]";
}
}
}