using YD_Event.Core.Enum;
namespace YD_Event.Core.Entities;
///
/// 赛事比赛场次表
///
[SugarTable("EventSession")]
public class EventSession : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime, IAvailability
{
///
/// 关联的赛事ID
///
public long EventId { get; set; }
///
/// 关联的赛事项目ID
///
public long EventProjectId { get; set; }
///
/// 关联的赛事项目组别ID(本场次为多个组别混合时为空)
///
[SugarColumn(IsNullable = true)]
public long? EventProjectGroupId { get; set; }
///
/// 关联的比赛场地ID
///
public long VenueId { get; set; }
///
/// 关联的计分规则ID(取自项目配置的计分规则)
///
public long ScoreRuleId { get; set; }
///
/// 场次编号(同一赛事内未删除数据中唯一)
///
[SugarColumn(Length = 32)]
public string SessionNo { get; set; } = null!;
///
/// 场次名称
///
[SugarColumn(Length = 128, IsNullable = true)]
public string? SessionName { get; set; }
///
/// 场次开始时间
///
[SugarColumn(IsNullable = true)]
public DateTime? StartTime { get; set; }
///
/// 场次结束时间
///
[SugarColumn(IsNullable = true)]
public DateTime? EndTime { get; set; }
///
/// 场次状态:0-草稿,10-就绪,30-进行中,60-已结束,90-已取消
///
public int SessionStatus { get; set; }
///
/// 版本号(场次内容变更时递增)
///
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; }
}