From b1e918e5cb9b21ca7ecbc6fad965edb28c2a29d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=A2=93=E5=BD=AD?= Date: Wed, 18 Mar 2026 14:27:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=81=E4=B9=A6=E6=A8=A1=E5=9D=97=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=97=A0=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Domain/Certificate/CertificateModel.cs | 31 ------ YD_Event.Core/Entities/CertificateElement.cs | 96 ------------------- 2 files changed, 127 deletions(-) delete mode 100644 YD_Event.Core/Entities/CertificateElement.cs diff --git a/YD_Event.Core/Domain/Certificate/CertificateModel.cs b/YD_Event.Core/Domain/Certificate/CertificateModel.cs index f4afd73..681437e 100644 --- a/YD_Event.Core/Domain/Certificate/CertificateModel.cs +++ b/YD_Event.Core/Domain/Certificate/CertificateModel.cs @@ -32,34 +32,3 @@ public class CertificateModel /// public int Height { get; set; } } - -/// -/// 证书文档 -/// -public class CertificateDocument -{ - private readonly CertificateModel _model; - private readonly List _elements; - private readonly Dictionary _data; - private readonly string _qrCodeUrl; - - public CertificateDocument(CertificateModel model, List elements, - Dictionary data, string qrCodeUrl) - { - _model = model; - _elements = elements; - _data = data; - _qrCodeUrl = qrCodeUrl; - } - - /// - /// 生成PDF - /// - /// PDF字节数组 - public byte[] GeneratePdf() - { - // 这里应该使用QuestPDF生成PDF - // 暂时返回空字节数组,实际项目中需要实现 - return new byte[0]; - } -} diff --git a/YD_Event.Core/Entities/CertificateElement.cs b/YD_Event.Core/Entities/CertificateElement.cs deleted file mode 100644 index 14f264c..0000000 --- a/YD_Event.Core/Entities/CertificateElement.cs +++ /dev/null @@ -1,96 +0,0 @@ -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; } - } -}