using YD_Event.Core.Enum;
namespace YD_Event.Core.Entities;
///
/// 赛事检录任务表
/// 一个检录员对应一条任务,记录总检录次数以及当前检录轮次、组别;
/// Current 系列字段为现场进度快照,切换检次或重新绑定检录员时会被重置
///
[SugarTable("CheckinTask")]
public class CheckinTask : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime, IAvailability
{
///
/// 关联的赛事ID
///
public long EventId { get; set; }
///
/// 该检录员负责的检次:1-一检,2-二检,3-三检
///
public int CheckinNo { get; set; } = 1;
///
/// 关联的检录员用户ID(尚未绑定检录员时为空)
///
[SugarColumn(IsNullable = true)]
public long? CheckerUserId { get; set; }
///
/// 赛事的检录总次数
///
public int TotalRounds { get; set; } = 1;
///
/// 当前检录轮次(与 CheckinNo 保持一致)
///
public int CurrentRound { get; set; } = 1;
///
/// 当前秩序册列标识
///
[SugarColumn(Length = 64, IsNullable = true)]
public string? CurrentSessionKey { get; set; }
///
/// 当前秩序册列的出场顺序
///
public int CurrentSessionOrder { get; set; }
///
/// 当前秩序册列名称
///
[SugarColumn(Length = 256, IsNullable = true)]
public string? CurrentSessionName { get; set; }
///
/// 当前检录的赛事项目ID
///
[SugarColumn(IsNullable = true)]
public long? CurrentEventProjectId { get; set; }
///
/// 当前秩序册列所在场地
///
[SugarColumn(Length = 128, IsNullable = true)]
public string? CurrentSessionVenue { get; set; }
///
/// 检次名称(由 CheckinNo 转换而来,如一检、二检)
///
[SugarColumn(Length = 64)]
public string RoundName { get; set; } = "赛前检录";
///
/// 当前检录的参赛组别ID(不限定组别时为空)
///
[SugarColumn(IsNullable = true)]
public long? CurrentGroupId { get; set; }
///
/// 当前检录的参赛组别名称
///
[SugarColumn(Length = 128)]
public string CurrentGroupName { get; set; } = string.Empty;
///
/// 当前组别的顺序
///
public int GroupOrder { get; set; }
///
/// 本次检录的组别总数
///
public int TotalGroups { get; set; }
///
/// 下一个待检录组别名称
///
[SugarColumn(Length = 128, IsNullable = true)]
public string? NextGroupName { get; set; }
///
/// 检录场地
///
[SugarColumn(Length = 128, IsNullable = true)]
public string? Venue { get; set; }
///
/// 任务状态:0-未开始,1-进行中,2-已结束
///
public int TaskStatus { get; set; }
///
/// 可用状态
///
public AvailabilityStatus Status { get; set; } = AvailabilityStatus.Enable;
///
/// 标记删除
///
public bool DeleteMark { get; set; }
///
/// 创建人
///
public long CreatedUserId { get; set; }
///
/// 创建时间
///
public DateTime CreatedTime { get; set; }
///
/// 更新人
///
[SugarColumn(IsNullable = true)]
public long? UpdatedUserId { get; set; }
///
/// 更新时间
///
[SugarColumn(IsNullable = true)]
public DateTime? UpdatedTime { get; set; }
}