using YD_Event.Core.Enum;
namespace YD_Event.Core.Entities;
///
/// 赛事场次出场记录表
///
[SugarTable("EventSessionEntry")]
public class EventSessionEntry : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime, IAvailability
{
///
/// 关联的比赛场次ID
///
public long SessionId { get; set; }
///
/// 关联的赛事参赛记录ID(未匹配到参赛记录时为空)
///
[SugarColumn(IsNullable = true)]
public long? ParticipationRecordId { get; set; }
///
/// 关联的报名项目明细ID
///
[SugarColumn(IsNullable = true)]
public long? RegistrationItemId { get; set; }
///
/// 出场数据来源:0-报名平台编排,1-秩序册导入
///
public int SourceType { get; set; }
///
/// 出场编号(项目序号+场地序号+出场顺序)
///
[SugarColumn(Length = 32)]
public string EntryNo { get; set; } = null!;
///
/// 出场顺序(同一场次内未删除数据中唯一)
///
public int PlayOrder { get; set; }
///
/// 出场状态:0-待出场,10-已检录,20-已叫号,30-进行中,40-已完成,80-退赛,90-取消比赛资格
///
public int EntryStatus { get; set; }
///
/// 叫号时间
///
[SugarColumn(IsNullable = true)]
public DateTime? CallTime { get; set; }
///
/// 开始比赛时间
///
[SugarColumn(IsNullable = true)]
public DateTime? StartTime { get; set; }
///
/// 结束比赛时间
///
[SugarColumn(IsNullable = true)]
public DateTime? FinishTime { get; set; }
///
/// 是否为重赛产生的出场记录
///
public bool IsRematch { get; set; }
///
/// 重赛来源出场记录ID
///
[SugarColumn(IsNullable = true)]
public long? RematchFromEntryId { get; set; }
///
/// 成绩是否已作废
///
public bool IsVoided { get; set; }
///
/// 成绩作废原因
///
[SugarColumn(Length = 512, IsNullable = true)]
public string? VoidReason { get; set; }
///
/// 参赛人员姓名
///
[SugarColumn(Length = 128)]
public string ParticipantName { get; set; } = null!;
///
/// 参赛队伍名称(个人项目时为空)
///
[SugarColumn(Length = 128, IsNullable = true)]
public string? TeamName { get; set; }
///
/// 参赛组别名称
///
[SugarColumn(Length = 128)]
public string GroupName { get; set; } = null!;
///
/// 版本号(出场信息变更时递增)
///
public int Version { get; set; } = 1;
///
/// 可用状态
///
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; }
}