diff --git a/YD_Event.Core/Entities/EventJudgeAssignment.cs b/YD_Event.Core/Entities/EventJudgeAssignment.cs index 8a8bcf5..87ec5bf 100644 --- a/YD_Event.Core/Entities/EventJudgeAssignment.cs +++ b/YD_Event.Core/Entities/EventJudgeAssignment.cs @@ -40,6 +40,12 @@ public class EventJudgeAssignment : Entity, ISoftDelete, ICreatedUserId, I [SugarColumn(Length = 32)] public string JudgeRole { get; set; } = null!; + /// + /// 裁判角色类别编码(如 DP、DM、DR、P、T) + /// + [SugarColumn(Length = 16, IsNullable = true)] + public string? JudgeRoleType { get; set; } + /// /// 分配状态:0-草稿,1-已提交,2-已替换,9-已停用 /// diff --git a/YD_Event.Core/Entities/EventJudgeMessage.cs b/YD_Event.Core/Entities/EventJudgeMessage.cs new file mode 100644 index 0000000..8e18236 --- /dev/null +++ b/YD_Event.Core/Entities/EventJudgeMessage.cs @@ -0,0 +1,90 @@ +namespace YD_Event.Core.Entities; + +/// +/// 裁判端消息表 +/// +[SugarTable("EventJudgeMessage")] +public class EventJudgeMessage : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime +{ + /// + /// 关联的赛事ID + /// + public long EventId { get; set; } + + /// + /// 接收用户ID + /// + public long ReceiverUserId { get; set; } + + /// + /// 接收裁判ID + /// + public long RefereeId { get; set; } + + /// + /// 消息类型:1-成绩修正提醒,2-评分任务下发,3-重赛通知,9-系统通知 + /// + public int MessageType { get; set; } + + /// + /// 消息标题 + /// + [SugarColumn(Length = 128)] + public string Title { get; set; } = null!; + + /// + /// 消息内容 + /// + [SugarColumn(Length = 512)] + public string Content { get; set; } = null!; + + /// + /// 关联业务类型 + /// + [SugarColumn(Length = 32, IsNullable = true)] + public string? RelationType { get; set; } + + /// + /// 关联业务ID + /// + [SugarColumn(IsNullable = true)] + public long? RelationId { get; set; } + + /// + /// 是否已读 + /// + public bool IsRead { get; set; } + + /// + /// 阅读时间 + /// + [SugarColumn(IsNullable = true)] + public DateTime? ReadTime { 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; } +} diff --git a/YD_Event.Core/Entities/EventJudgeScoreDetail.cs b/YD_Event.Core/Entities/EventJudgeScoreDetail.cs new file mode 100644 index 0000000..bb4ec9b --- /dev/null +++ b/YD_Event.Core/Entities/EventJudgeScoreDetail.cs @@ -0,0 +1,120 @@ +namespace YD_Event.Core.Entities; + +/// +/// 裁判评分明细表 +/// +[SugarTable("EventJudgeScoreDetail")] +public class EventJudgeScoreDetail : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime +{ + /// + /// 关联的裁判评分单ID + /// + public long ScoreSheetId { get; set; } + + /// + /// 关联的计分规则明细ID + /// + [SugarColumn(IsNullable = true)] + public long? ScoreRuleItemId { get; set; } + + /// + /// 评分项编码 + /// + [SugarColumn(Length = 64)] + public string ItemCode { get; set; } = null!; + + /// + /// 评分项名称(快照) + /// + [SugarColumn(Length = 128)] + public string ItemName { get; set; } = null!; + + /// + /// 评分对象编码(如 A、B) + /// + [SugarColumn(Length = 32, IsNullable = true)] + public string? SubjectCode { get; set; } + + /// + /// 评分项类型:1-难度计数,2-规定元素,3-表现维度,4-扣分项,5-取消资格,6-规定赛评分项 + /// + public int ItemType { get; set; } + + /// + /// 得分维度:0-不计入,1-难度分,2-表现分,3-规定分,4-扣分 + /// + public int ScoreDimension { get; set; } + + /// + /// 录入数量 + /// + [SugarColumn(DecimalDigits = 4, IsNullable = true)] + public decimal? CountValue { get; set; } + + /// + /// 录入分值 + /// + [SugarColumn(DecimalDigits = 4, IsNullable = true)] + public decimal? InputValue { get; set; } + + /// + /// 单位分值 + /// + [SugarColumn(DecimalDigits = 4, IsNullable = true)] + public decimal? UnitValue { get; set; } + + /// + /// 本项小计 + /// + [SugarColumn(DecimalDigits = 4)] + public decimal Subtotal { get; set; } + + /// + /// 是否自动生成 + /// + public bool IsAutoGenerated { get; set; } + + /// + /// 来源评分项编码 + /// + [SugarColumn(Length = 64, IsNullable = true)] + public string? ParentItemCode { get; set; } + + /// + /// 扩展信息(JSON) + /// + [SugarColumn(Length = 1000, IsNullable = true)] + public string? ExtensionJson { get; set; } + + /// + /// 排序 + /// + public int Sort { 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; } +} diff --git a/YD_Event.Core/Entities/EventJudgeScoreSheet.cs b/YD_Event.Core/Entities/EventJudgeScoreSheet.cs new file mode 100644 index 0000000..8cdcbaa --- /dev/null +++ b/YD_Event.Core/Entities/EventJudgeScoreSheet.cs @@ -0,0 +1,197 @@ +namespace YD_Event.Core.Entities; + +/// +/// 裁判评分单表 +/// +[SugarTable("EventJudgeScoreSheet")] +public class EventJudgeScoreSheet : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime +{ + /// + /// 关联的赛事ID + /// + public long EventId { get; set; } + + /// + /// 关联的比赛场次ID + /// + public long SessionId { get; set; } + + /// + /// 关联的场次出场记录ID + /// + public long SessionEntryId { get; set; } + + /// + /// 关联的裁判评分任务ID + /// + public long JudgeTaskId { get; set; } + + /// + /// 关联的裁判分配ID + /// + public long JudgeAssignmentId { get; set; } + + /// + /// 关联的裁判档案ID + /// + public long RefereeId { get; set; } + + /// + /// 提交用户ID + /// + [SugarColumn(IsNullable = true)] + public long? JudgeUserId { get; set; } + + /// + /// 裁判席位编码 + /// + [SugarColumn(Length = 32)] + public string JudgeRole { get; set; } = null!; + + /// + /// 裁判角色类别编码 + /// + [SugarColumn(Length = 16)] + public string JudgeRoleType { get; set; } = null!; + + /// + /// 关联的计分规则ID + /// + public long ScoreRuleId { get; set; } + + /// + /// 计分规则版本号 + /// + public int RuleVersion { get; set; } = 1; + + /// + /// 评分单版本号 + /// + public int SheetVersion { get; set; } = 1; + + /// + /// 评分单状态:0-草稿,10-已提交,20-已确认,30-已被修正,90-已作废 + /// + public int SheetStatus { get; set; } + + /// + /// 是否为当前有效版本 + /// + public bool IsCurrent { get; set; } = true; + + /// + /// 难度分 + /// + [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 RequiredCompletedCount { get; set; } + + /// + /// 规定元素缺失数量 + /// + [SugarColumn(DecimalDigits = 4)] + public decimal RequiredMissingCount { get; set; } + + /// + /// 合计得分 + /// + [SugarColumn(DecimalDigits = 4)] + public decimal TotalScore { get; set; } + + /// + /// 是否取消比赛资格 + /// + public bool IsDisqualified { get; set; } + + /// + /// 取消比赛资格原因编码 + /// + [SugarColumn(Length = 64, IsNullable = true)] + public string? DisqualifyReasonCode { get; set; } + + /// + /// 取消比赛资格补充说明 + /// + [SugarColumn(Length = 512, IsNullable = true)] + public string? DisqualifyRemark { get; set; } + + /// + /// 计算明细(JSON) + /// + [SugarColumn(ColumnDataType = "nvarchar(max)", IsNullable = true)] + public string? CalculationJson { get; set; } + + /// + /// 提交幂等键 + /// + [SugarColumn(Length = 64)] + public string IdempotencyKey { get; set; } = null!; + + /// + /// 提交时间 + /// + [SugarColumn(IsNullable = true)] + public DateTime? SubmittedTime { get; set; } + + /// + /// 来源评分单ID + /// + [SugarColumn(IsNullable = true)] + public long? OriginalSheetId { get; set; } + + /// + /// 修正原因 + /// + [SugarColumn(Length = 512, IsNullable = true)] + public string? CorrectionReason { 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; } +} diff --git a/YD_Event.Core/Entities/EventJudgeTask.cs b/YD_Event.Core/Entities/EventJudgeTask.cs new file mode 100644 index 0000000..0d458af --- /dev/null +++ b/YD_Event.Core/Entities/EventJudgeTask.cs @@ -0,0 +1,156 @@ +namespace YD_Event.Core.Entities; + +/// +/// 裁判评分任务表 +/// +[SugarTable("EventJudgeTask")] +public class EventJudgeTask : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime +{ + /// + /// 关联的赛事ID + /// + public long EventId { get; set; } + + /// + /// 关联的比赛场次ID + /// + public long SessionId { get; set; } + + /// + /// 关联的场次出场记录ID + /// + public long SessionEntryId { get; set; } + + /// + /// 关联的裁判分配ID + /// + public long JudgeAssignmentId { get; set; } + + /// + /// 关联的赛事裁判记录ID + /// + public long EventRefereeId { get; set; } + + /// + /// 关联的裁判档案ID + /// + public long RefereeId { get; set; } + + /// + /// 关联的小程序用户ID + /// + [SugarColumn(IsNullable = true)] + public long? JudgeUserId { get; set; } + + /// + /// 裁判席位编码 + /// + [SugarColumn(Length = 32)] + public string JudgeRole { get; set; } = null!; + + /// + /// 裁判角色类别编码 + /// + [SugarColumn(Length = 16)] + public string JudgeRoleType { get; set; } = null!; + + /// + /// 关联的计分规则ID + /// + public long ScoreRuleId { get; set; } + + /// + /// 计分规则版本号 + /// + public int RuleVersion { get; set; } = 1; + + /// + /// 任务快照(JSON) + /// + [SugarColumn(ColumnDataType = "nvarchar(max)")] + public string TaskSnapshotJson { get; set; } = null!; + + /// + /// 任务类型:0-正常打分,1-成绩修正 + /// + public int TaskType { get; set; } + + /// + /// 任务状态:0-待下发,10-已下发,20-已接收,30-评分中,40-已提交,50-需修正,60-已修正,80-已拒绝,90-已作废,99-已过期 + /// + public int TaskStatus { get; set; } + + /// + /// 任务版本号 + /// + public int TaskVersion { get; set; } = 1; + + /// + /// 下发时间 + /// + [SugarColumn(IsNullable = true)] + public DateTime? DispatchedTime { get; set; } + + /// + /// 接收时间 + /// + [SugarColumn(IsNullable = true)] + public DateTime? AcceptedTime { get; set; } + + /// + /// 提交时间 + /// + [SugarColumn(IsNullable = true)] + public DateTime? SubmittedTime { get; set; } + + /// + /// 任务截止时间 + /// + [SugarColumn(IsNullable = true)] + public DateTime? ExpiresTime { get; set; } + + /// + /// 来源任务ID + /// + [SugarColumn(IsNullable = true)] + public long? OriginalTaskId { get; set; } + + /// + /// 拒绝原因 + /// + [SugarColumn(Length = 512, IsNullable = true)] + public string? RejectReason { 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; } +} diff --git a/YD_Event.Core/Entities/EventReferee.cs b/YD_Event.Core/Entities/EventReferee.cs index f4b476f..4dc4d82 100644 --- a/YD_Event.Core/Entities/EventReferee.cs +++ b/YD_Event.Core/Entities/EventReferee.cs @@ -25,7 +25,7 @@ public class EventReferee : Entity, ISoftDelete, ICreatedUserId, ICreatedT public long? RefereeApplicationId { get; set; } /// - /// 关联来源:1-后台添加,2-小程序报名 + /// 关联来源:1-后台添加,2-小程序报名,3-秩序册导入 /// public int SourceType { get; set; } = 1; diff --git a/YD_Event.Core/Entities/EventResult.cs b/YD_Event.Core/Entities/EventResult.cs index a65c95a..9f0ae0e 100644 --- a/YD_Event.Core/Entities/EventResult.cs +++ b/YD_Event.Core/Entities/EventResult.cs @@ -69,6 +69,75 @@ public class EventResult : Entity, ISoftDelete, ICreatedUserId, ICreatedTi [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; } + + /// + /// 当前成绩版本号 + /// + public int ResultVersion { get; set; } = 1; + + /// + /// 聚合计算明细(JSON) + /// + [SugarColumn(ColumnDataType = "nvarchar(max)", IsNullable = true)] + public string? CalculationJson { get; set; } + /// /// 排名 /// @@ -114,4 +183,4 @@ public class EventResult : Entity, ISoftDelete, ICreatedUserId, ICreatedTi /// 更新时间 /// public DateTime? UpdatedTime { get; set; } -} \ No newline at end of file +} diff --git a/YD_Event.Core/Entities/EventResultScreenCast.cs b/YD_Event.Core/Entities/EventResultScreenCast.cs new file mode 100644 index 0000000..4513b82 --- /dev/null +++ b/YD_Event.Core/Entities/EventResultScreenCast.cs @@ -0,0 +1,121 @@ +namespace YD_Event.Core.Entities; + +/// +/// 成绩投屏记录表 +/// +[SugarTable("EventResultScreenCast")] +public class EventResultScreenCast : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime +{ + /// + /// 关联的赛事ID + /// + public long EventId { get; set; } + + /// + /// 投屏类型:1-成绩,2-排名 + /// + public int CastType { get; set; } + + /// + /// 投屏场地ID + /// + [SugarColumn(IsNullable = true)] + public long? VenueId { get; set; } + + /// + /// 关联的赛事项目ID + /// + [SugarColumn(IsNullable = true)] + public long? EventProjectId { get; set; } + + /// + /// 关联的赛事项目组别ID + /// + [SugarColumn(IsNullable = true)] + public long? EventProjectGroupId { get; set; } + + /// + /// 关联的比赛场次ID + /// + [SugarColumn(IsNullable = true)] + public long? SessionId { get; set; } + + /// + /// 关联的场次出场记录ID + /// + [SugarColumn(IsNullable = true)] + public long? SessionEntryId { get; set; } + + /// + /// 关联的赛事成绩ID + /// + [SugarColumn(IsNullable = true)] + public long? EventResultId { get; set; } + + /// + /// 投屏时的成绩版本号 + /// + [SugarColumn(IsNullable = true)] + public int? ResultVersion { get; set; } + + /// + /// 投屏内容快照(JSON) + /// + [SugarColumn(ColumnDataType = "nvarchar(max)")] + public string PayloadJson { get; set; } = null!; + + /// + /// 投屏状态:0-已投出,10-已撤回,20-已被新投屏替换 + /// + public int CastStatus { get; set; } + + /// + /// 投屏时间 + /// + public DateTime CastTime { get; set; } + + /// + /// 撤回时间 + /// + [SugarColumn(IsNullable = true)] + public DateTime? RevokedTime { get; set; } + + /// + /// 撤回人 + /// + [SugarColumn(IsNullable = true)] + public long? RevokedUserId { 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; } +} diff --git a/YD_Event.Core/Entities/EventResultVersion.cs b/YD_Event.Core/Entities/EventResultVersion.cs new file mode 100644 index 0000000..0c6dd8f --- /dev/null +++ b/YD_Event.Core/Entities/EventResultVersion.cs @@ -0,0 +1,140 @@ +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; } +} diff --git a/YD_Event.Core/Entities/EventScoreCorrection.cs b/YD_Event.Core/Entities/EventScoreCorrection.cs new file mode 100644 index 0000000..8b6b9de --- /dev/null +++ b/YD_Event.Core/Entities/EventScoreCorrection.cs @@ -0,0 +1,118 @@ +namespace YD_Event.Core.Entities; + +/// +/// 成绩修正申请表 +/// +[SugarTable("EventScoreCorrection")] +public class EventScoreCorrection : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime +{ + /// + /// 关联的赛事ID + /// + public long EventId { get; set; } + + /// + /// 关联的比赛场次ID + /// + public long SessionId { get; set; } + + /// + /// 关联的场次出场记录ID + /// + public long SessionEntryId { get; set; } + + /// + /// 被修正的原评分单ID + /// + public long OriginalScoreSheetId { get; set; } + + /// + /// 关联的裁判分配ID + /// + public long JudgeAssignmentId { get; set; } + + /// + /// 裁判席位编码 + /// + [SugarColumn(Length = 32)] + public string JudgeRole { get; set; } = null!; + + /// + /// 修正任务ID + /// + [SugarColumn(IsNullable = true)] + public long? CorrectionTaskId { get; set; } + + /// + /// 修正完成后产生的新评分单ID + /// + [SugarColumn(IsNullable = true)] + public long? NewScoreSheetId { get; set; } + + /// + /// 申请人ID + /// + public long ApplyUserId { get; set; } + + /// + /// 申请修正原因 + /// + [SugarColumn(Length = 512)] + public string ApplyReason { get; set; } = null!; + + /// + /// 审批人ID + /// + [SugarColumn(IsNullable = true)] + public long? ApproveUserId { get; set; } + + /// + /// 审批意见 + /// + [SugarColumn(Length = 512, IsNullable = true)] + public string? ApproveRemark { get; set; } + + /// + /// 审批时间 + /// + [SugarColumn(IsNullable = true)] + public DateTime? ApproveTime { get; set; } + + /// + /// 修正状态:0-已申请,10-已批准,20-已拒绝,30-裁判修改中,40-已完成,90-已取消 + /// + public int CorrectionStatus { get; set; } + + /// + /// 完成时间 + /// + [SugarColumn(IsNullable = true)] + public DateTime? CompletedTime { 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; } +} diff --git a/YD_Event.Core/Entities/EventSession.cs b/YD_Event.Core/Entities/EventSession.cs index 945e001..ef03e6b 100644 --- a/YD_Event.Core/Entities/EventSession.cs +++ b/YD_Event.Core/Entities/EventSession.cs @@ -59,7 +59,13 @@ public class EventSession : Entity, ISoftDelete, ICreatedUserId, ICreatedT public DateTime? EndTime { get; set; } /// - /// 场次状态:0-草稿,10-就绪,30-进行中,60-已结束,90-已取消 + /// 当前出场记录ID + /// + [SugarColumn(IsNullable = true)] + public long? CurrentEntryId { get; set; } + + /// + /// 场次状态:0-草稿,10-就绪,20-检录中,30-进行中,40-暂停,50-待确认,60-已结束,90-已取消 /// public int SessionStatus { get; set; } diff --git a/YD_Event.Core/Entities/EventSessionEntry.cs b/YD_Event.Core/Entities/EventSessionEntry.cs index b2f0d2a..3efab64 100644 --- a/YD_Event.Core/Entities/EventSessionEntry.cs +++ b/YD_Event.Core/Entities/EventSessionEntry.cs @@ -22,7 +22,13 @@ public class EventSessionEntry : Entity, ISoftDelete, ICreatedUserId, ICre /// /// 关联的报名项目明细ID /// - public long RegistrationItemId { get; set; } + [SugarColumn(IsNullable = true)] + public long? RegistrationItemId { get; set; } + + /// + /// 出场数据来源:0-报名平台编排,1-秩序册导入 + /// + public int SourceType { get; set; } /// /// 出场编号(项目序号+场地序号+出场顺序) @@ -36,10 +42,50 @@ public class EventSessionEntry : Entity, ISoftDelete, ICreatedUserId, ICre public int PlayOrder { get; set; } /// - /// 出场状态:0-待出场(其余状态由打分系统流转时写入) + /// 出场状态:0-待出场,10-已检录,20-已叫号,30-进行中,40-已完成,80-退赛,90-取消比赛资格 /// public int EntryStatus { get; set; } + /// + /// 叫号时间 + /// + [SugarColumn(IsNullable = true)] + public DateTime? CallTime { get; set; } + + /// + /// 开始比赛时间 + /// + [SugarColumn(IsNullable = true)] + public DateTime? StartTime { get; set; } + + /// + /// 结束比赛时间 + /// + [SugarColumn(IsNullable = true)] + public DateTime? FinishTime { get; set; } + + /// + /// 是否为重赛产生的出场记录 + /// + public bool IsRematch { get; set; } + + /// + /// 重赛来源出场记录ID + /// + [SugarColumn(IsNullable = true)] + public long? RematchFromEntryId { get; set; } + + /// + /// 成绩是否已作废 + /// + public bool IsVoided { get; set; } + + /// + /// 成绩作废原因 + /// + [SugarColumn(Length = 512, IsNullable = true)] + public string? VoidReason { get; set; } + /// /// 参赛人员姓名 /// diff --git a/YD_Event.Core/Entities/EventSessionEntryRematch.cs b/YD_Event.Core/Entities/EventSessionEntryRematch.cs new file mode 100644 index 0000000..f1719da --- /dev/null +++ b/YD_Event.Core/Entities/EventSessionEntryRematch.cs @@ -0,0 +1,101 @@ +namespace YD_Event.Core.Entities; + +/// +/// 重赛记录表 +/// +[SugarTable("EventSessionEntryRematch")] +public class EventSessionEntryRematch : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime +{ + /// + /// 关联的赛事ID + /// + public long EventId { get; set; } + + /// + /// 关联的赛事项目ID + /// + public long EventProjectId { get; set; } + + /// + /// 关联的赛事项目组别ID + /// + [SugarColumn(IsNullable = true)] + public long? EventProjectGroupId { get; set; } + + /// + /// 原比赛场次ID + /// + public long OriginalSessionId { get; set; } + + /// + /// 原场次出场记录ID + /// + public long OriginalSessionEntryId { get; set; } + + /// + /// 重赛场次ID + /// + [SugarColumn(IsNullable = true)] + public long? NewSessionId { get; set; } + + /// + /// 重赛出场记录ID + /// + [SugarColumn(IsNullable = true)] + public long? NewSessionEntryId { get; set; } + + /// + /// 重赛原因编码 + /// + [SugarColumn(Length = 64)] + public string ReasonCode { get; set; } = null!; + + /// + /// 重赛原因说明 + /// + [SugarColumn(Length = 512)] + public string RematchReason { get; set; } = null!; + + /// + /// 申请人ID + /// + public long ApplyUserId { get; set; } + + /// + /// 重赛状态:0-已申请,10-已安排,20-已完成,90-已取消 + /// + public int RematchStatus { get; set; } + + /// + /// 完成时间 + /// + [SugarColumn(IsNullable = true)] + public DateTime? CompletedTime { 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; } +} diff --git a/YD_Event.Core/Entities/ScoreRule.cs b/YD_Event.Core/Entities/ScoreRule.cs index ceb34d9..ed6aa45 100644 --- a/YD_Event.Core/Entities/ScoreRule.cs +++ b/YD_Event.Core/Entities/ScoreRule.cs @@ -32,6 +32,17 @@ public class ScoreRule : Entity, ISoftDelete, ICreatedUserId, ICreatedTime [SugarColumn(Length = 4000, IsNullable = true)] public string? RuleConfigJson { get; set; } + /// + /// 规则版本号 + /// + public int RuleVersion { get; set; } = 1; + + /// + /// 规则明细列表(导航属性) + /// + [SugarColumn(IsIgnore = true)] + public List? Items { get; set; } + /// /// 可用状态 /// diff --git a/YD_Event.Core/Entities/ScoreRuleItem.cs b/YD_Event.Core/Entities/ScoreRuleItem.cs new file mode 100644 index 0000000..0744acf --- /dev/null +++ b/YD_Event.Core/Entities/ScoreRuleItem.cs @@ -0,0 +1,125 @@ +namespace YD_Event.Core.Entities; + +/// +/// 计分规则明细表 +/// +[SugarTable("ScoreRuleItem")] +public class ScoreRuleItem : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime +{ + /// + /// 关联的计分规则ID + /// + public long ScoreRuleId { get; set; } + + /// + /// 裁判角色类别编码 + /// + [SugarColumn(Length = 16)] + public string JudgeRoleType { get; set; } = null!; + + /// + /// 评分项编码 + /// + [SugarColumn(Length = 64)] + public string ItemCode { get; set; } = null!; + + /// + /// 评分项名称 + /// + [SugarColumn(Length = 128)] + public string ItemName { get; set; } = null!; + + /// + /// 评分项类型:1-难度等级计数,2-规定元素计数,3-表现维度,4-扣分项,5-取消资格原因,6-规定赛评分项 + /// + public int ItemType { get; set; } + + /// + /// 父级评分项编码 + /// + [SugarColumn(Length = 64, IsNullable = true)] + public string? ParentItemCode { get; set; } + + /// + /// 单位分值 + /// + [SugarColumn(DecimalDigits = 4, IsNullable = true)] + public decimal? UnitValue { get; set; } + + /// + /// 最小值 + /// + [SugarColumn(DecimalDigits = 4, IsNullable = true)] + public decimal? MinValue { get; set; } + + /// + /// 最大值 + /// + [SugarColumn(DecimalDigits = 4, IsNullable = true)] + public decimal? MaxValue { get; set; } + + /// + /// 录入步长 + /// + [SugarColumn(DecimalDigits = 4, IsNullable = true)] + public decimal? StepValue { get; set; } + + /// + /// 默认值 + /// + [SugarColumn(DecimalDigits = 4, IsNullable = true)] + public decimal? DefaultValue { get; set; } + + /// + /// 计算方式:0-数量×单位分值累加,1-直接取录入值,2-仅记录不参与合计 + /// + public int CalcMode { get; set; } + + /// + /// 计入的得分维度:0-不计入,1-难度分,2-表现分,3-规定分,4-扣分 + /// + public int ScoreDimension { get; set; } + + /// + /// 是否必填 + /// + public bool IsRequired { get; set; } + + /// + /// 扩展配置(JSON) + /// + [SugarColumn(Length = 2000, IsNullable = true)] + public string? ExtensionJson { get; set; } + + /// + /// 排序 + /// + public int Sort { 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; } +}