using System.Dynamic; namespace DS.WMS.Core.Op.Entity { /// /// 邮件模板模型 /// public class MailTemplateModel { /// /// 业务ID /// public long BusinessId { get; set; } /// /// 业务ID /// public BusinessType BusinessType { get; set; } = BusinessType.OceanShippingExport; /// /// 发送附件 /// public List? FileAttachments { get; set; } /// /// 主要数据项 /// public dynamic Primary { get; set; } = new ExpandoObject(); } /// /// 文件附件 /// public class FileAttachment { /// /// 文件物理路径 /// public string FilePath { get; set; } /// /// 附件显示的名称(为空时显示原始文件名) /// public string? DisplayName { get; set; } } /// /// 邮件模板模型 /// /// 数据类型 public class MailTemplateModel : MailTemplateModel { /// /// 主要数据项 /// public new T Primary { get; internal set; } /// /// 初始化 /// /// 主数据 public MailTemplateModel(T primary) { Primary = primary; } } /// /// 邮件模板模型 /// /// 主要数据类型 /// 次要数据类型 public class MailTemplateModel : MailTemplateModel { /// /// 次要数据项 /// public T2 Secondary { get; internal set; } /// /// 初始化 /// /// 主数据 /// 主数据 public MailTemplateModel(T1 primary, T2 secondary) : base(primary) { Secondary = secondary; } } }