using SqlSugar;
using YD_Event.Core.Enum;
namespace YD_Event.Core.Entities;
///
/// 项目表
///
[SugarTable("Project")]
public class Project : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime, IAvailability
{
///
/// 项目名称
///
[SugarColumn(Length = 128)]
public string Name { get; set; }
///
/// 项目类型(枚举)
///
[SugarColumn(SqlParameterDbType = System.Data.DbType.Int32)]
public ProjectTypeEnum ProjectType { get; set; }
///
/// 完成人数模式(0=单一值, 1=范围值)
///
public int CompletionCountType { get; set; } = 0;
///
/// 完成人数(单一值模式时有效)
///
public int CompletionCount { get; set; }
///
/// 完成人数最小值(范围值模式时有效)
///
public int? CompletionCountMin { get; set; }
///
/// 完成人数最大值(范围值模式时有效)
///
public int? CompletionCountMax { get; set; }
///
/// 费用(元)
///
public decimal Fee { get; set; }
///
/// 时长(分钟)
///
public int DurationMinutes { get; set; }
///
/// 时长(秒)
///
public int DurationSeconds { get; set; }
///
/// 计分规则ID(未配置计分规则时为空,赛事编排确认前必须配置)
///
[SugarColumn(IsNullable = true)]
public long? ScoreRuleId { get; set; }
///
/// 备注
///
[SugarColumn(ColumnDescription = "备注", Length = 500, IsNullable = true)]
public string? Remark { get; set; }
///
/// 场地数量(编排用)
///
public int VenueCount { get; set; }
///
/// 排序索引(编排用)
///
public int SortIndex { get; set; }
///
/// 项目组别列表(导航属性)
///
[SugarColumn(IsIgnore = true)]
public List? Groups { get; set; }
///
/// 可用状态
///
public AvailabilityStatus Status { 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; }
}