using System;
using YD_Event.Core.Enum;
namespace YD_Event.Core.Entities;
///
/// 赛事成绩表
///
[SugarTable("EventResult")]
public class EventResult : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime, IAvailability
{
///
/// 可用状态
///
public AvailabilityStatus Status { get; set; }
///
/// 关联的参赛记录ID
///
public long ParticipationRecordId { get; set; }
///
/// 关联的报名ID
///
public long RegistrationId { get; set; }
///
/// 关联的报名人员ID
///
public long RegistrationPersonId { get; set; }
///
/// 归属单位认证 ID(从 EventRegistration 继承)
///
[SugarColumn(IsNullable = true)]
public long? MerchantCertificationId { get; set; }
///
/// 赛事ID
///
public long EventId { get; set; }
///
/// 赛事项目ID
///
public long ProjectId { get; set; }
///
/// 参赛选手姓名
///
[SugarColumn(Length = 64)]
public string ParticipantName { get; set; }
///
/// 参赛组别
///
[SugarColumn(Length = 64)]
public string GroupName { get; set; }
///
/// 项目类型名称
///
[SugarColumn(Length = 64)]
public string ProjectTypeName { get; set; }
///
/// 成绩
///
[SugarColumn(Length = 32)]
public string Score { get; set; }
///
/// 关联的比赛场次ID
///
[SugarColumn(IsNullable = true)]
public long? SessionId { get; set; }
///
/// 关联的场次出场记录ID
///
[SugarColumn(IsNullable = true)]
public long? SessionEntryId { get; set; }
///
/// 难度分
///
[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, IsNullable = true)]
public decimal? TotalScore { 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; }
///
/// 成绩复核人(后台系统用户ID)
///
[SugarColumn(IsNullable = true)]
public long? ReviewUserId { get; set; }
///
/// 成绩复核时间
///
[SugarColumn(IsNullable = true)]
public DateTime? ReviewTime { get; set; }
///
/// 当前成绩版本号
///
public int ResultVersion { get; set; } = 1;
///
/// 聚合计算明细(JSON)
///
[SugarColumn(ColumnDataType = "nvarchar(max)", IsNullable = true)]
public string? CalculationJson { get; set; }
///
/// 排名
///
public int Rank { get; set; }
///
/// 获奖等级:1-特等奖,2-一等奖,3-二等奖,4-三等奖,5-优秀奖
///
public int AwardLevel { get; set; }
///
/// 获奖状态:0-未获奖,1-已获奖
///
public int AwardStatus { get; set; }
///
/// 备注
///
[SugarColumn(ColumnDataType = "TEXT")]
public string? Remark { get; set; }
///
/// 标记删除
///
public bool DeleteMark { get; set; }
///
/// 创建人
///
public long CreatedUserId { get; set; }
///
/// 创建时间
///
public DateTime CreatedTime { get; set; }
///
/// 更新人
///
public long? UpdatedUserId { get; set; }
///
/// 更新时间
///
public DateTime? UpdatedTime { get; set; }
}