103 lines
2.6 KiB
C#
Raw Normal View History

2026-08-11 23:41:18 +08:00
using YD_Event.Core.Enum;
namespace YD_Event.Core.Entities;
/// <summary>
/// 赛事比赛场次表(编排确认后生成的正式场次)
/// </summary>
[SugarTable("EventSession")]
public class EventSession : Entity<long>, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime, IAvailability
{
/// <summary>
/// 关联的赛事ID
/// </summary>
public long EventId { get; set; }
/// <summary>
/// 关联的赛事项目ID
/// </summary>
public long EventProjectId { get; set; }
/// <summary>
/// 关联的赛事项目组别ID(本场次为多个组别混合时为空)
/// </summary>
[SugarColumn(IsNullable = true)]
public long? EventProjectGroupId { get; set; }
/// <summary>
/// 关联的比赛场地ID
/// </summary>
public long VenueId { get; set; }
/// <summary>
/// 关联的计分规则ID(取自项目配置的计分规则)
/// </summary>
public long ScoreRuleId { get; set; }
/// <summary>
/// 场次编号(同一赛事内未删除数据中唯一)
/// </summary>
[SugarColumn(Length = 32)]
public string SessionNo { get; set; } = null!;
/// <summary>
/// 场次名称
/// </summary>
[SugarColumn(Length = 128, IsNullable = true)]
public string? SessionName { get; set; }
/// <summary>
/// 场次开始时间
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? StartTime { get; set; }
/// <summary>
/// 场次结束时间
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? EndTime { get; set; }
/// <summary>
/// 场次状态:0-草稿,10-就绪,30-进行中,60-已结束,90-已取消
/// </summary>
public int SessionStatus { get; set; }
/// <summary>
/// 版本号(场次内容变更时递增)
/// </summary>
public int Version { get; set; } = 1;
/// <summary>
/// 可用状态
/// </summary>
public AvailabilityStatus Status { get; set; } = AvailabilityStatus.Enable;
/// <summary>
/// 标记删除
/// </summary>
public bool DeleteMark { get; set; }
/// <summary>
/// 创建人
/// </summary>
public long CreatedUserId { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreatedTime { get; set; }
/// <summary>
/// 更新人
/// </summary>
[SugarColumn(IsNullable = true)]
public long? UpdatedUserId { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? UpdatedTime { get; set; }
}