YD_Event.Admin/YD_Event.Core/Entities/CertificateTemplate.cs

93 lines
3.0 KiB
C#
Raw Normal View History

2026-03-03 16:46:02 +08:00
using System;
2026-03-04 12:13:49 +08:00
using YD_Event.Core.Enum;
2026-03-03 16:46:02 +08:00
using SqlSugar;
namespace YD_Event.Core.Entities
{
/// <summary>
/// 证书模板表 (CertificateTemplate)
/// </summary>
[SugarTable("CertificateTemplate")]
public class CertificateTemplate : Entity<long>, ISoftDelete, ICreatedUserId, ICreatedTime,
IUpdatedUserId, IUpdatedTime, IAvailability
2026-03-03 16:46:02 +08:00
{
/// <summary>
/// 版本号
/// </summary>
[SugarColumn(ColumnDescription = "版本号", IsNullable = false)]
public int Version { get; set; }
/// <summary>
2026-03-04 12:13:49 +08:00
/// 模板类型: Image/Docx
2026-03-03 16:46:02 +08:00
/// </summary>
2026-03-04 12:13:49 +08:00
[SugarColumn(ColumnDescription = "模板类型", IsNullable = false, DefaultValue = "Image")]
public string TemplateType { get; set; }
/// <summary>
/// 背景图片 URL (Image类型使用)
/// </summary>
[SugarColumn(ColumnDescription = "背景图片URL", IsNullable = true)]
2026-03-03 16:46:02 +08:00
public string BackgroundImageUrl { get; set; }
2026-03-04 12:13:49 +08:00
/// <summary>
/// DOCX模板文件URL (Docx类型使用)
/// </summary>
[SugarColumn(ColumnDescription = "DOCX模板文件URL", IsNullable = true)]
public string DocxTemplateUrl { get; set; }
/// <summary>
/// 占位符配置JSON (Docx类型使用)
/// </summary>
[SugarColumn(ColumnDescription = "占位符配置", IsNullable = true, IsJson = true)]
public string PlaceholderJson { get; set; }
2026-03-03 16:46:02 +08:00
/// <summary>
/// 像素宽度
/// </summary>
[SugarColumn(ColumnDescription = "像素宽度", IsNullable = false)]
public int Width { get; set; }
/// <summary>
/// 像素高度
/// </summary>
[SugarColumn(ColumnDescription = "像素高度", IsNullable = false)]
public int Height { get; set; }
/// <summary>
/// 是否当前激活版本
/// </summary>
[SugarColumn(ColumnDescription = "是否当前激活版本", DefaultValue = "0")]
public bool IsActive { get; set; }
2026-03-04 12:13:49 +08:00
/// <summary>
/// 状态 (Enable/Disable)
/// </summary>
[SugarColumn(ColumnDescription = "状态", DefaultValue = "1")]
public AvailabilityStatus Status { get; set; }
2026-03-03 16:46:02 +08:00
/// <summary>
/// 软删除
/// </summary>
[SugarColumn(ColumnDescription = "软删除")]
public bool DeleteMark { get; set; }
/// <summary>
/// 创建人ID
/// </summary>
[SugarColumn(ColumnDescription = "创建人ID")]
public long CreatedUserId { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[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; }
2026-03-03 16:46:02 +08:00
}
}