using DS.WMS.Core.Op.Entity;
namespace DS.WMS.Core.TaskInteraction.Dtos
{
///
/// 邮件模板模型基类
///
public class MailTemplateModelBase
{
///
/// 附件
///
public List? FileAttachments { get; set; }
///
/// 发件人
///
public MailSender? Sender { get; set; }
///
/// 收件人
///
public List Receivers { get; set; } = [];
///
/// 收件人姓名
///
public string Contacts => Receivers == null ? string.Empty : string.Join(",", Receivers.Select(x => x.DisplayName));
///
/// 主要数据项
///
public dynamic? Primary { get; protected internal set; }
}
///
/// 邮件模板业务模型
///
public class MailTemplateModel : MailTemplateModelBase
{
///
/// 业务ID
///
public long BusinessId { get; set; }
///
/// 业务类型
///
public BusinessType? BusinessType { get; set; }
///
/// 销售
///
public Contact? Sales { get; set; }
///
/// 客服
///
public Contact? CustomerService { get; set; }
///
/// 操作
///
public Contact? Operator { get; set; }
///
/// 单证
///
public Contact? Document { get; set; }
///
/// 订舱口全称
///
public string? ForwarderName { get; set; }
///
/// 国内发货人全称
///
public string? DomesticShipperName { get; set; }
///
/// 委托单位全称
///
public string? CustomerName { get; set; }
///
/// 箱型价格列表
///
public List? CtnPriceList { get; set; }
}
///
/// 发件人
///
public class MailSender
{
///
/// 显示名称
///
public string? DisplayName { get; set; }
///
/// 手机号码
///
public string? Phone { get; set; }
///
/// 邮件地址
///
public string MailAddress { get; set; }
///
/// 个人签名内容
///
public string? SignatureHtml { get; set; }
}
///
/// 收件人
///
public class MailReceiver
{
///
/// 显示名称
///
public string DisplayName { get; set; }
///
/// 邮件地址
///
public string MailAddress { get; set; }
}
///
/// 文件附件
///
public class FileAttachment
{
///
/// 文件物理路径
///
public string FilePath { get; set; }
///
/// 附件显示的名称(为空时显示原始文件名)
///
public string? DisplayName { get; set; }
}
///
/// 联系人
///
public class Contact
{
///
/// 联系人ID
///
public long Id { get; set; }
///
/// 登录账号
///
public string? Code { get; set; }
///
/// 中文姓名
///
public string? Name { get; set; }
///
/// 英文名
///
public string? EnName { get; set; }
///
/// 座机
///
public string? Tel { get; set; }
///
/// 手机号/微信
///
public string? Mobile { get; set; }
///
/// QQ号
///
public string? QQ { get; set; }
///
/// 邮箱
///
public string? Email { get; set; }
///
/// 类型
///
public string? CustomerType { get; set; }
}
///
/// 邮件模板模型
///
/// 数据类型
public class MailTemplateModel : MailTemplateModel
{
///
/// 主要数据项
///
public new T Primary { get; internal set; }
///
/// 初始化
///
/// 主数据
public MailTemplateModel(T primary)
{
Primary = primary;
}
}
}