namespace YD_Event.Core.Entities;
///
/// 赛事成绩版本表
///
[SugarTable("EventResultVersion")]
public class EventResultVersion : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime
{
///
/// 关联的赛事成绩ID
///
public long EventResultId { get; set; }
///
/// 关联的赛事ID
///
public long EventId { get; set; }
///
/// 关联的场次出场记录ID
///
public long SessionEntryId { get; set; }
///
/// 成绩版本号
///
public int ResultVersion { get; set; } = 1;
///
/// 难度分
///
[SugarColumn(DecimalDigits = 4)]
public decimal DifficultyScore { get; set; }
///
/// 表现分
///
[SugarColumn(DecimalDigits = 4)]
public decimal PerformanceScore { get; set; }
///
/// 规定分
///
[SugarColumn(DecimalDigits = 4)]
public decimal RequiredScore { get; set; }
///
/// 扣分
///
[SugarColumn(DecimalDigits = 4)]
public decimal DeductionScore { get; set; }
///
/// 正式总分
///
[SugarColumn(DecimalDigits = 4)]
public decimal TotalScore { get; set; }
///
/// 名次
///
[SugarColumn(IsNullable = true)]
public int? Rank { get; set; }
///
/// 是否取消比赛资格
///
public bool IsDisqualified { get; set; }
///
/// 取消比赛资格原因编码
///
[SugarColumn(Length = 64, IsNullable = true)]
public string? DisqualifyReasonCode { get; set; }
///
/// 成绩状态:0-计算中,10-待复核,20-已确认,30-已投屏,40-已更正,90-已作废
///
public int ResultStatus { get; set; }
///
/// 版本来源:0-正常聚合,1-成绩修正,2-重赛
///
public int SourceType { get; set; }
///
/// 关联的成绩修正申请ID
///
[SugarColumn(IsNullable = true)]
public long? ScoreCorrectionId { get; set; }
///
/// 关联的计分规则ID
///
public long ScoreRuleId { get; set; }
///
/// 计分规则版本号
///
public int RuleVersion { get; set; } = 1;
///
/// 聚合计算明细(JSON)
///
[SugarColumn(ColumnDataType = "nvarchar(max)", IsNullable = true)]
public string? CalculationJson { get; set; }
///
/// 版本说明
///
[SugarColumn(Length = 512, IsNullable = true)]
public string? Remark { get; set; }
///
/// 标记删除
///
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; }
}