ltx 25830581d2 feat(api): 完善小程序赛事角色与秩序册检录接口
新增成绩查询、裁判认证及检录员账号管理接口,并统一小程序角色登录与个人中心数据。

检录任务绑定赛事秩序册场次,按项目、组别、场地和场次顺序执行;支持最多三名检录员、分配检录轮次及前序检录校验。

补充检录任务、检录记录、裁判申请实体及四份数据库迁移,包含表字段备注、秩序册绑定和检录序号。
2026-08-07 14:59:15 +08:00

154 lines
5.5 KiB
C#

namespace YD_Event.Application.Client.Dtos;
public class CheckinGroupOptionDto
{
public long Id { get; set; }
public long EventProjectId { get; set; }
public long ProjectId { get; set; }
public string ProjectName { get; set; } = string.Empty;
public string GroupName { get; set; } = string.Empty;
public int Order { get; set; }
public int TotalUnits { get; set; }
public int CheckedUnits { get; set; }
public int LockedUnits { get; set; }
public int ProgressPercent { get; set; }
public bool IsCompleted { get; set; }
}
public class CheckinProjectOptionDto
{
public long EventProjectId { get; set; }
public long ProjectId { get; set; }
public string ProjectName { get; set; } = string.Empty;
public int Order { get; set; }
public List<CheckinGroupOptionDto> Groups { get; set; } = new();
public int TotalUnits { get; set; }
public int CheckedUnits { get; set; }
public int LockedUnits { get; set; }
public int ProgressPercent { get; set; }
public bool IsCompleted { get; set; }
}
/// <summary>秩序册中的一列;团队项目的一列可以包含多名运动员。</summary>
public class CheckinOrderBookUnitDto
{
public string UnitKey { get; set; } = string.Empty;
public int Order { get; set; }
public int SessionIndex { get; set; }
public int VenueIndex { get; set; }
public string VenueName { get; set; } = string.Empty;
public long EventProjectId { get; set; }
public long ProjectId { get; set; }
public string ProjectName { get; set; } = string.Empty;
public long? GroupId { get; set; }
public string GroupName { get; set; } = string.Empty;
public long RegistrationItemId { get; set; }
public string TeamName { get; set; } = string.Empty;
public string UnitName { get; set; } = string.Empty;
public List<long> RegistrationPersonIds { get; set; } = new();
public List<CheckinAthleteDto> Athletes { get; set; } = new();
}
public class CheckinRoundOptionDto
{
public int Round { get; set; }
public string RoundName { get; set; } = string.Empty;
public List<CheckinGroupOptionDto> Groups { get; set; } = new();
}
public class CheckinEventOptionsDto
{
public long EventId { get; set; }
public string EventName { get; set; } = string.Empty;
public List<CheckinSessionOptionDto> Sessions { get; set; } = new();
public List<CheckinProjectOptionDto> Projects { get; set; } = new();
public List<CheckinOrderBookUnitDto> Units { get; set; } = new();
public int MaxCheckers { get; set; } = 3;
public List<int> AssignedCheckinNumbers { get; set; } = new();
public int NextCheckinNo { get; set; } = 1;
// 兼容旧版小程序字段;场次检录启用后不再作为数据源。
public List<CheckinRoundOptionDto> Rounds { get; set; } = new();
}
public class CheckinSessionOptionDto
{
public string SessionKey { get; set; } = string.Empty;
public int Order { get; set; }
public int SessionIndex { get; set; }
public long EventProjectId { get; set; }
public long ProjectId { get; set; }
public string ProjectName { get; set; } = string.Empty;
public string SessionName { get; set; } = string.Empty;
public string GroupName { get; set; } = string.Empty;
public string VenueName { get; set; } = string.Empty;
public List<long> GroupIds { get; set; } = new();
public List<long> RegistrationPersonIds { get; set; } = new();
}
public class SaveCheckerInput
{
public long? CheckerUserId { get; set; }
[Required(ErrorMessage = "赛事ID不能为空")]
public long EventId { get; set; }
[Required(ErrorMessage = "姓名不能为空")]
public string Name { get; set; } = string.Empty;
[Required(ErrorMessage = "手机号不能为空")]
[RegularExpression(@"^1[3-9]\d{9}$", ErrorMessage = "手机号格式不正确")]
public string Mobile { get; set; } = string.Empty;
public int CheckinNo { get; set; }
public string? Password { get; set; }
public string? CurrentSessionKey { get; set; }
public int? CurrentRound { get; set; }
public long? CurrentGroupId { get; set; }
public string? Venue { get; set; }
}
public class UpdateCheckinProgressInput
{
[Required(ErrorMessage = "任务ID不能为空")]
public long TaskId { get; set; }
public long EventProjectId { get; set; }
public long GroupId { get; set; }
}
public class UnbindCheckerInput
{
[Required(ErrorMessage = "任务ID不能为空")]
public long TaskId { get; set; }
}
public class CheckinCheckerDto
{
public long CheckerUserId { get; set; }
public string Name { get; set; } = string.Empty;
public string Mobile { get; set; } = string.Empty;
public int CheckinNo { get; set; }
public long TaskId { get; set; }
public long EventId { get; set; }
public string EventName { get; set; } = string.Empty;
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 string Venue { get; set; } = string.Empty;
public string CurrentSessionKey { get; set; } = string.Empty;
public int CurrentSessionOrder { get; set; }
public string CurrentSessionName { get; set; } = string.Empty;
public string CurrentSessionVenue { get; set; } = string.Empty;
public int TaskStatus { get; set; }
public DateTime CreatedTime { get; set; }
}
public class CheckerAccountAvailabilityDto
{
public bool Available { get; set; }
public string Message { get; set; } = string.Empty;
}