Files
poprhythm 45edcf5e5f 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.
2026-01-10 18:36:52 -05:00

24 lines
874 B
C#

using Core.Entities;
using Core.Models;
using Core.Validation.Rules.BaseRules;
namespace Core.Validation.Rules.StudentAssignmentRules;
/// <summary>
/// Validation rule that checks if a student has been assigned at least one regional event
/// </summary>
public class NoRegionalEventAssignmentRule : RequiredEventTypeAssignmentRuleBase
{
protected override bool IsRequired(ValidationConfiguration config) => config.RequireRegionalEvent;
protected override bool HasEventType(StudentEventStatistics statistics) => statistics.HasRegionalEvent;
protected override ValidationSeverity GetSeverity(ValidationConfiguration config) => config.NoRegionalEventSeverity;
protected override string Code => "NO_REGIONAL_EVENT_ASSIGNED";
protected override string Message => "No Regional Event";
protected override string IconIdentifier => "RegionalEvent";
}