using System; using YD_Event.Core.Enum; using SqlSugar; namespace YD_Event.Core.Entities { /// /// 证书模板表 (CertificateTemplate) /// [SugarTable("CertificateTemplate")] public class CertificateTemplate : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime, IAvailability { /// /// 版本号 /// [SugarColumn(ColumnDescription = "版本号", IsNullable = false)] public int Version { get; set; } /// /// 模板类型: Image/Docx /// [SugarColumn(ColumnDescription = "模板类型", IsNullable = false, DefaultValue = "Image")] public string TemplateType { get; set; } /// /// 背景图片 URL (Image类型使用) /// [SugarColumn(ColumnDescription = "背景图片URL", IsNullable = true)] public string BackgroundImageUrl { get; set; } /// /// DOCX模板文件URL (Docx类型使用) /// [SugarColumn(ColumnDescription = "DOCX模板文件URL", IsNullable = true)] public string DocxTemplateUrl { get; set; } /// /// 占位符配置JSON (Docx类型使用) /// [SugarColumn(ColumnDescription = "占位符配置", IsNullable = true, IsJson = true)] public string PlaceholderJson { get; set; } /// /// 像素宽度 /// [SugarColumn(ColumnDescription = "像素宽度", IsNullable = false)] public int Width { get; set; } /// /// 像素高度 /// [SugarColumn(ColumnDescription = "像素高度", IsNullable = false)] public int Height { get; set; } /// /// 是否当前激活版本 /// [SugarColumn(ColumnDescription = "是否当前激活版本", DefaultValue = "0")] public bool IsActive { get; set; } /// /// 状态 (Enable/Disable) /// [SugarColumn(ColumnDescription = "状态", DefaultValue = "1")] public AvailabilityStatus Status { get; set; } /// /// 软删除 /// [SugarColumn(ColumnDescription = "软删除")] public bool DeleteMark { get; set; } /// /// 创建人ID /// [SugarColumn(ColumnDescription = "创建人ID")] public long CreatedUserId { get; set; } /// /// 创建时间 /// [SugarColumn(ColumnDescription = "创建时间")] public DateTime CreatedTime { get; set; } [SugarColumn(ColumnDescription = "修改人ID", IsNullable = true)] public long? UpdatedUserId { get; set; } [SugarColumn(ColumnDescription = "修改时间", IsNullable = true)] public DateTime? UpdatedTime { get; set; } } }