164 lines
6.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;
/// <summary>
/// 是否为团队项目,用于区分整队检录和个人逐人检录。
/// </summary>
public bool IsTeamProject { get; set; }
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; }
/// <summary>报名方式:1-个人报名,2-单位报名;无法关联报名记录时为空。</summary>
public int? RegistrationMode { 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;
public bool ExistingChecker { get; set; }
public long? CheckerUserId { get; set; }
public string CheckerName { get; set; } = string.Empty;
}