using System; using SqlSugar; namespace YD_Event.Core.Entities { /// /// 证书元素表 (CertificateElement) /// [SugarTable("CertificateElement")] public class CertificateElement : Entity, ISoftDelete, ISortable { /// /// 模板ID (关联 CertificateTemplate) /// [SugarColumn(ColumnDescription = "模板ID", IsNullable = false)] public long TemplateId { get; set; } /// /// 元素类型: Text, Image, QRCode /// [SugarColumn(ColumnDescription = "元素类型", IsNullable = false)] public string Type { get; set; } /// /// 字段名/标签 (维护用) /// [SugarColumn(ColumnDescription = "字段名", IsNullable = true)] public string FieldName { get; set; } /// /// 绑定键 (业务数据字段) /// [SugarColumn(ColumnDescription = "绑定键", IsNullable = true)] public string BindingKey { get; set; } /// /// X坐标 (px) /// [SugarColumn(ColumnDescription = "X坐标", IsNullable = false)] public float X { get; set; } /// /// Y坐标 (px) /// [SugarColumn(ColumnDescription = "Y坐标", IsNullable = false)] public float Y { get; set; } /// /// 宽度 (px) /// [SugarColumn(ColumnDescription = "宽度", IsNullable = false)] public float Width { get; set; } /// /// 高度 (px) /// [SugarColumn(ColumnDescription = "高度", IsNullable = false)] public float Height { get; set; } /// /// 字体 /// [SugarColumn(ColumnDescription = "字体", DefaultValue = "Source Han Sans CN", IsNullable = true)] public string FontFamily { get; set; } /// /// 字号 /// [SugarColumn(ColumnDescription = "字号", IsNullable = false)] public float FontSize { get; set; } /// /// 颜色代码 #RRGGBB /// [SugarColumn(ColumnDescription = "颜色", IsNullable = true)] public string Color { get; set; } /// /// 额外样式 JSON /// [SugarColumn(ColumnDescription = "额外样式", IsNullable = true, IsJson = true)] public string StyleJson { get; set; } /// /// 排序 /// [SugarColumn(ColumnDescription = "排序")] public int Sort { get; set; } /// /// 软删除 /// [SugarColumn(ColumnDescription = "软删除")] public bool DeleteMark { get; set; } } }