83 lines
2.1 KiB
C#
83 lines
2.1 KiB
C#
using YD_Event.Core.Enum;
|
||
|
||
namespace YD_Event.Core.Entities;
|
||
|
||
/// <summary>
|
||
/// 项目计分规则表
|
||
/// </summary>
|
||
[SugarTable("ScoreRule")]
|
||
public class ScoreRule : Entity<long>, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime, IAvailability
|
||
{
|
||
/// <summary>
|
||
/// 规则编码(未删除数据中唯一,如 ROPE_PRESCRIBED、FREESTYLE_SINGLE)
|
||
/// </summary>
|
||
[SugarColumn(Length = 64)]
|
||
public string RuleCode { get; set; } = null!;
|
||
|
||
/// <summary>
|
||
/// 规则名称
|
||
/// </summary>
|
||
[SugarColumn(Length = 128)]
|
||
public string RuleName { get; set; } = null!;
|
||
|
||
/// <summary>
|
||
/// 裁判席位配置(JSON格式,按裁判组描述该规则需要的裁判角色席位)
|
||
/// </summary>
|
||
[SugarColumn(Length = 2000)]
|
||
public string JudgeRoleSchemaJson { get; set; } = null!;
|
||
|
||
/// <summary>
|
||
/// 计分参数配置(JSON格式,规则的扣分项、权重等扩展参数)
|
||
/// </summary>
|
||
[SugarColumn(Length = 4000, IsNullable = true)]
|
||
public string? RuleConfigJson { get; set; }
|
||
|
||
/// <summary>
|
||
/// 规则版本号
|
||
/// </summary>
|
||
public int RuleVersion { get; set; } = 1;
|
||
|
||
/// <summary>
|
||
/// 规则明细列表(导航属性)
|
||
/// </summary>
|
||
[SugarColumn(IsIgnore = true)]
|
||
public List<ScoreRuleItem>? Items { get; set; }
|
||
|
||
/// <summary>
|
||
/// 可用状态
|
||
/// </summary>
|
||
public AvailabilityStatus Status { get; set; } = AvailabilityStatus.Enable;
|
||
|
||
/// <summary>
|
||
/// 排序
|
||
/// </summary>
|
||
public int Sort { get; set; }
|
||
|
||
/// <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; }
|
||
}
|