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 MailSender Sender { get; set; }
///
/// 收件人
///
public List Receivers { get; set; }
///
/// 收件人姓名
///
public string Contacts => Receivers == null ? string.Empty : string.Join(",", Receivers.Select(x => x.DisplayName));
///
/// 销售
///
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 dynamic? Primary { get; protected internal 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? 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 class Client
{
///
/// 客户ID
///
public long Id { get; set; }
///
/// 中文全称
///
public string? Name { get; set; }
///
/// 英文全称
///
public string? EnName { 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;
}
}
}