namespace YD_Event.Application.Client.Dtos; /// /// 成绩查询赛事信息DTO /// public class ScoreEventDto { public long Id { get; set; } public string Name { get; set; } = string.Empty; /// /// 赛事状态:3-比赛中,4-已结束。成绩查询只开放这两种状态。 /// public int EventStatus { get; set; } public string EventStatusText { get; set; } = string.Empty; } /// /// 成绩查询输入参数 /// public class ScoreQueryInput { public long? EventId { get; set; } /// /// 项目筛选,对应基础项目 Project.Id。 /// public long? ProjectId { get; set; } /// /// 组别筛选,成绩表按组别名称存储。 /// public string? GroupName { get; set; } public string? Keyword { get; set; } } /// /// 成绩查询页的项目、组别下拉数据 /// public class ScoreFilterOptionsDto { public long EventId { get; set; } public string EventName { get; set; } = string.Empty; public List Projects { get; set; } = new(); public List GroupNames { get; set; } = new(); } /// /// 成绩查询项目组别筛选DTO /// public class ScoreProjectFilterDto { public long ProjectId { get; set; } public string ProjectName { get; set; } = string.Empty; public List GroupNames { get; set; } = new(); } /// /// 裁判打分项DTO /// public class JudgeScoreDto { public string Label { get; set; } = string.Empty; public string Score { get; set; } = string.Empty; } /// /// 客户端成绩列表项DTO /// public class ClientScoreDto { public long Id { get; set; } public long EventId { get; set; } public string EventName { get; set; } = string.Empty; public string AthleteName { get; set; } = string.Empty; public string AthleteNo { get; set; } = string.Empty; public long ProjectId { get; set; } public string Category { get; set; } = string.Empty; public string GroupName { get; set; } = string.Empty; public string RoundName { get; set; } = "正式成绩"; public int Rank { get; set; } public string TotalScore { get; set; } = string.Empty; /// /// 难度分。规定赛没有难度分,值为 0 时不进入 JudgeScores。 /// public decimal DifficultyScore { get; set; } /// /// 表现分 /// public decimal PerformanceScore { get; set; } /// /// 规定分 /// public decimal RequiredScore { get; set; } /// /// 扣分 /// public decimal DeductionScore { get; set; } public bool IsDisqualified { get; set; } public string Status { get; set; } = "成绩有效"; public List JudgeScores { get; set; } = new(); } /// /// 成绩查询输出结果 /// public class ScoreQueryOutput { public List Rows { get; set; } = new(); public int Total { get; set; } /// /// 成绩数据的最后更新时间,页面显示“数据更新:yyyy-MM-dd HH:mm:ss”。 /// public DateTime? DataUpdatedTime { get; set; } public string DataUpdatedText { get; set; } = string.Empty; /// /// 实时排名提示,成绩确认前均为参考值。 /// public string Notice { get; set; } = "本排名实时更新,非最终成绩,仅供参考。"; } /// /// 裁判报名输入参数 /// public class RefereeApplyInput { [Required(ErrorMessage = "赛事ID不能为空")] public long EventId { get; set; } } /// /// 裁判认证提交参数,对应小程序“裁判认证”页面。 /// public class RefereeProfileSubmitInput { [Required(ErrorMessage = "姓名不能为空"), StringLength(64)] public string Name { get; set; } = string.Empty; /// /// 手机号。为空时取当前登录账号手机号 /// [RegularExpression(@"^1[3-9]\d{9}$", ErrorMessage = "手机号格式不正确")] public string? Mobile { get; set; } /// /// 短信验证码。更换手机号时必填 /// public string? VerificationCode { get; set; } [Required(ErrorMessage = "请选择地区")] public string ProvinceCode { get; set; } = string.Empty; [Required(ErrorMessage = "请选择地区")] public string ProvinceName { get; set; } = string.Empty; [Required(ErrorMessage = "请选择地区")] public string CityCode { get; set; } = string.Empty; [Required(ErrorMessage = "请选择地区")] public string CityName { get; set; } = string.Empty; [Required(ErrorMessage = "请选择地区")] public string DistrictCode { get; set; } = string.Empty; [Required(ErrorMessage = "请选择地区")] public string DistrictName { get; set; } = string.Empty; [Required(ErrorMessage = "请选择裁判级别")] public RefereeLevel Level { get; set; } [Required(ErrorMessage = "请上传裁判证件")] public string CertificateUrl { get; set; } = string.Empty; /// /// 可执裁角色,位标记多选。 /// [Range(1, int.MaxValue, ErrorMessage = "至少选择一个裁判角色")] public RefereeRole Roles { get; set; } } /// /// 裁判认证信息DTO /// public class RefereeProfileDto { public long Id { get; set; } public string Name { get; set; } = string.Empty; public string Mobile { get; set; } = string.Empty; public string ProvinceCode { get; set; } = string.Empty; public string ProvinceName { get; set; } = string.Empty; public string CityCode { get; set; } = string.Empty; public string CityName { get; set; } = string.Empty; public string DistrictCode { get; set; } = string.Empty; public string DistrictName { get; set; } = string.Empty; public string RegionName { get; set; } = string.Empty; public RefereeLevel Level { get; set; } public string LevelName { get; set; } = string.Empty; public string CertificateUrl { get; set; } = string.Empty; public RefereeRole Roles { get; set; } public List RoleValues { get; set; } = new(); public List RoleNames { get; set; } = new(); public AuditStatus AuditStatus { get; set; } public string AuditStatusText { get; set; } = string.Empty; public string? AuditRemark { get; set; } /// /// 审核通过后才能报名执裁 /// public bool CanApply { get; set; } public DateTime CreatedTime { get; set; } } /// /// 裁判认证页面的角色、级别下拉数据 /// public class RefereeProfileOptionsDto { public List Levels { get; set; } = new(); public List Roles { get; set; } = new(); } /// /// 裁判枚举选项DTO /// public class RefereeEnumOptionDto { public int Value { get; set; } public string Label { get; set; } = string.Empty; } /// /// 赛事裁判报名名额状态,对应原型“裁判名额未满/已满”提示。 /// public class RefereeQuotaDto { public long EventId { get; set; } public string EventName { get; set; } = string.Empty; /// /// 名额上限,0 表示不限名额。 /// public int Limit { get; set; } public int Applied { get; set; } public int Remaining { get; set; } public bool IsFull { get; set; } /// /// 当前账号是否已报名该赛事执裁 /// public bool Applied4Me { get; set; } public bool CanApply { get; set; } public string Message { get; set; } = string.Empty; } /// /// 裁判执裁申请记录DTO /// public class RefereeApplicationDto { public long Id { get; set; } public long ApplicationId { get; set; } public long EventId { get; set; } public string EventName { get; set; } = string.Empty; public string? CoverImage { get; set; } public string? Address { get; set; } public int EventStatus { get; set; } public int ApplicationStatus { get; set; } public string ApplicationStatusText { get; set; } = string.Empty; public DateTime AppliedAt { get; set; } public DateTime MatchStartTime { get; set; } public DateTime MatchEndTime { get; set; } public string MatchStartText => MatchStartTime.ToString("yyyy-MM-dd HH:mm"); public string MatchEndText => MatchEndTime.ToString("yyyy-MM-dd HH:mm"); } /// /// 裁判执裁申请列表输出 /// public class RefereeApplicationListOutput { public List Rows { get; set; } = new(); public int Total { get; set; } } /// /// 检录运动员信息DTO /// public class CheckinAthleteDto { public long Id { get; set; } public long UserId { get; set; } public string BibNo { get; set; } = string.Empty; public string Name { get; set; } = string.Empty; public string TeamName { get; set; } = string.Empty; public bool Checked { get; set; } public bool PreviousPassed { get; set; } = true; public bool CanCheck { get; set; } = true; public string LockReason { get; set; } = string.Empty; public string OrderBookSessionName { get; set; } = string.Empty; } /// /// 检录工作台上下文信息DTO /// public class CheckinContextDto { public long TaskId { get; set; } public long EventId { get; set; } public string EventName { get; set; } = string.Empty; public string Venue { get; set; } = string.Empty; public int TotalCheckins { get; set; } public int CurrentCheckinNo { get; set; } public string CurrentCheckinName { get; set; } = string.Empty; public int TotalSessions { get; set; } public int CurrentSessionOrder { get; set; } public string CurrentSessionKey { get; set; } = string.Empty; public string CurrentSessionName { get; set; } = string.Empty; public string CurrentSessionVenue { get; set; } = string.Empty; public string? NextSessionName { get; set; } public List Sessions { get; set; } = new(); public long SelectedEventProjectId { get; set; } public long SelectedGroupId { get; set; } public List Projects { get; set; } = new(); public List Units { get; set; } = new(); public List PendingUnits { get; set; } = new(); public List CheckedUnits { get; set; } = new(); public List LockedUnits { get; set; } = new(); /// /// 当前赛事是否允许检录操作(仅赛事状态为比赛中时为 true) /// public bool CanCheck { get; set; } = true; /// /// 不允许检录时的原因提示 /// public string CheckLockReason { get; set; } = string.Empty; /// /// 赛事状态枚举值 /// public int EventStatus { get; set; } /// /// 赛事状态文本 /// public string EventStatusText { get; set; } = string.Empty; // 以下字段保留给旧版小程序兼容,值映射自秩序册场次。 public int TotalRounds { get; set; } public int CurrentRound { get; set; } public string RoundName { get; set; } = string.Empty; public long? CurrentGroupId { get; set; } public string CurrentGroupName { get; set; } = string.Empty; public int GroupOrder { get; set; } public int TotalGroups { get; set; } public string? NextGroupName { get; set; } public List Rounds { get; set; } = new(); public List Athletes { get; set; } = new(); public List PendingAthletes { get; set; } = new(); public List CheckedAthletes { get; set; } = new(); public List LockedAthletes { get; set; } = new(); } /// /// 更新检录状态输入参数 /// public class UpdateCheckinStatusInput { [Required(ErrorMessage = "秩序册列标识不能为空")] public string UnitKey { get; set; } = string.Empty; public long EventProjectId { get; set; } public long GroupId { get; set; } public bool Checked { get; set; } } /// /// 秩序册检录列状态DTO /// public class CheckinOrderBookUnitStatusDto : CheckinOrderBookUnitDto { public bool Checked { get; set; } public bool PreviousPassed { get; set; } = true; public bool CanCheck { get; set; } = true; public string LockReason { get; set; } = string.Empty; /// /// 是否已上场;三检通过即视为上场。 /// public bool OnStage { get; set; } } /// /// 检录员开始检录并通知报名人员的入参 /// public class StartCheckinInput { [Required(ErrorMessage = "赛事项目ID不能为空")] public long EventProjectId { get; set; } /// 兼容旧客户端;项目级检录时无需传组别。 public long? GroupId { get; set; } } /// /// 开始检录后的通知结果 /// public class StartCheckinOutput { public long TaskId { get; set; } public long EventProjectId { get; set; } public string ProjectName { get; set; } = string.Empty; public long GroupId { get; set; } public string GroupName { get; set; } = string.Empty; /// /// 本次通知覆盖的秩序册列数量 /// public int UnitCount { get; set; } /// /// 应通知人数 /// public int NoticeTotal { get; set; } /// /// 短信通知成功人数 /// public int SmsSuccessCount { get; set; } /// /// 短信通知失败人数(手机号缺失或发送异常) /// public int SmsFailedCount { get; set; } public string Message { get; set; } = string.Empty; public CheckinContextDto Context { get; set; } = new(); } /// /// 扫码检录入参;扫码内容为运动员号码布编号或报名人员ID。 /// public class ScanCheckinInput { [Required(ErrorMessage = "扫码内容不能为空")] public string Code { get; set; } = string.Empty; public long? EventProjectId { get; set; } public long? GroupId { get; set; } } /// /// 扫码检录结果 /// public class ScanCheckinOutput { public bool Success { get; set; } public string Message { get; set; } = string.Empty; public string UnitKey { get; set; } = string.Empty; public string ProjectName { get; set; } = string.Empty; public string GroupName { get; set; } = string.Empty; public string UnitName { get; set; } = string.Empty; public string AthleteName { get; set; } = string.Empty; public string BibNo { get; set; } = string.Empty; public CheckinContextDto? Context { get; set; } } /// /// 标记秩序册列上场的入参;仅三检检录员可操作。 /// public class CheckinOnStageInput { [Required(ErrorMessage = "秩序册列标识不能为空")] public string UnitKey { get; set; } = string.Empty; public long EventProjectId { get; set; } public long GroupId { get; set; } } /// /// 面向运动员、教练的检录进度总览 /// public class CheckinProgressOutput { public long EventId { get; set; } public string EventName { get; set; } = string.Empty; /// /// 服务端当前时间,供小程序顶部时间展示。 /// public DateTime ServerTime { get; set; } public string ServerTimeText { get; set; } = string.Empty; public string WeekDayText { get; set; } = string.Empty; /// /// 当前检录项目(检录中的项目组别),无进行中项目时为空。 /// public CheckinProgressStageDto? CurrentCheckin { get; set; } /// /// 当前正在比赛的项目组别(三检已上场的最新一列) /// public CheckinProgressStageDto? CurrentCompeting { get; set; } /// /// 赛事检录顺序,按秩序册顺序输出三态。 /// public List Stages { get; set; } = new(); /// /// 我(或我关联的运动员)在本赛事的报名检录明细 /// public List Mine { get; set; } = new(); } /// /// 检录进度中的一个项目组别阶段 /// public class CheckinProgressStageDto { public long EventProjectId { get; set; } public long? GroupId { get; set; } public string ProjectName { get; set; } = string.Empty; public string GroupName { get; set; } = string.Empty; /// /// 项目-组别拼接名称,用于页面直接展示。 /// public string DisplayName { get; set; } = string.Empty; public int Order { get; set; } /// /// 阶段状态:1-检录中,2-即将开始,3-等待中,4-已完成。 /// public int StageStatus { get; set; } public string StageStatusText { get; set; } = string.Empty; public int TotalUnits { get; set; } public int CheckedUnits { get; set; } public int ProgressPercent { get; set; } /// /// 该阶段正在比赛的队伍名称 /// public string TeamName { get; set; } = string.Empty; /// /// 该阶段正在比赛的单位名称 /// public string UnitName { get; set; } = string.Empty; /// /// 报名类型展示文本:个人报名或团队报名 /// public string RegistrationTypeText { get; set; } = string.Empty; /// /// 该阶段正在比赛的队员名称列表 /// public List AthleteNames { get; set; } = new(); } /// /// 我的检录明细卡片 /// public class CheckinProgressMineDto { public string UnitKey { get; set; } = string.Empty; public long EventProjectId { get; set; } public long? GroupId { get; set; } public string ProjectName { get; set; } = string.Empty; public string GroupName { get; set; } = string.Empty; public string DisplayName { get; set; } = string.Empty; /// /// 运动员姓名列表;教练查看时为其带训报名人员。 /// public List AthleteNames { get; set; } = new(); public string TeamName { get; set; } = string.Empty; public string UnitName { get; set; } = string.Empty; public int SessionIndex { get; set; } public string VenueName { get; set; } = string.Empty; /// /// 我的检录状态:0-等待中,1-检录中,2-已检录,3-已上场。 /// public int CheckinStatus { get; set; } public string CheckinStatusText { get; set; } = string.Empty; /// /// 各检次通过情况明细 /// public List Rounds { get; set; } = new(); /// /// 页面提示,例如“请前往检录口”。 /// public string Notice { get; set; } = string.Empty; } /// /// 单个检次的通过情况 /// public class CheckinProgressRoundDto { public int CheckinNo { get; set; } public string CheckinName { get; set; } = string.Empty; public bool Passed { get; set; } public DateTime? CheckedTime { get; set; } /// /// 执行本次检录的检录员姓名 /// public string CheckerName { get; set; } = string.Empty; } /// /// 检录投屏数据 /// public class CheckinScreenCastOutput { public long EventId { get; set; } public string EventName { get; set; } = string.Empty; public DateTime ServerTime { get; set; } public string ServerTimeText { get; set; } = string.Empty; public string WeekDayText { get; set; } = string.Empty; public CheckinProgressStageDto? CurrentCheckin { get; set; } public CheckinProgressStageDto? CurrentCompeting { get; set; } public List Stages { get; set; } = new(); /// /// 当前检录项目下待上场的队伍明细,供大屏滚动展示。 /// public List Units { get; set; } = new(); } /// /// 投屏中的一列检录对象 /// public class CheckinScreenCastUnitDto { public string UnitKey { get; set; } = string.Empty; public int Order { get; set; } public int SessionIndex { get; set; } public string VenueName { get; set; } = string.Empty; public string ProjectName { get; set; } = string.Empty; public string GroupName { get; set; } = string.Empty; public string TeamName { get; set; } = string.Empty; public string UnitName { get; set; } = string.Empty; public List AthleteNames { get; set; } = new(); public int CheckinStatus { get; set; } public string CheckinStatusText { get; set; } = string.Empty; }