You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
231 lines
5.5 KiB
C#
231 lines
5.5 KiB
C#
namespace DS.WMS.Core.Op.Entity
|
|
{
|
|
/// <summary>
|
|
/// 邮件模板模型
|
|
/// </summary>
|
|
public class MailTemplateModel
|
|
{
|
|
/// <summary>
|
|
/// 业务ID
|
|
/// </summary>
|
|
public long BusinessId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 业务ID
|
|
/// </summary>
|
|
public BusinessType BusinessType { get; set; } = BusinessType.OceanShippingExport;
|
|
|
|
/// <summary>
|
|
/// 发送附件
|
|
/// </summary>
|
|
public List<FileAttachment>? FileAttachments { get; set; }
|
|
|
|
/// <summary>
|
|
/// 发件人
|
|
/// </summary>
|
|
public MailSender Sender { get; set; }
|
|
|
|
/// <summary>
|
|
/// 收件人
|
|
/// </summary>
|
|
public List<MailReceiver> Receivers { get; set; }
|
|
|
|
/// <summary>
|
|
/// 收件人姓名
|
|
/// </summary>
|
|
public string Contacts => Receivers == null ? string.Empty : string.Join(",", Receivers.Select(x => x.DisplayName));
|
|
|
|
/// <summary>
|
|
/// 销售
|
|
/// </summary>
|
|
public Contact? Sales { get; set; }
|
|
|
|
/// <summary>
|
|
/// 客服
|
|
/// </summary>
|
|
public Contact? CustomerService { get; set; }
|
|
|
|
/// <summary>
|
|
/// 操作
|
|
/// </summary>
|
|
public Contact? Operator { get; set; }
|
|
|
|
/// <summary>
|
|
/// 单证
|
|
/// </summary>
|
|
public Contact? Document { get; set; }
|
|
|
|
/// <summary>
|
|
/// 订舱口全称
|
|
/// </summary>
|
|
public string? ForwarderName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 国内发货人全称
|
|
/// </summary>
|
|
public string? DomesticShipperName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 委托单位全称
|
|
/// </summary>
|
|
public string? CustomerName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 主要数据项
|
|
/// </summary>
|
|
public dynamic? Primary { get; protected internal set; }
|
|
|
|
/// <summary>
|
|
/// 箱型价格列表
|
|
/// </summary>
|
|
public List<BusinessCtnPrice>? CtnPriceList { get; set; }
|
|
}
|
|
|
|
public class MailSender
|
|
{
|
|
/// <summary>
|
|
/// 显示名称
|
|
/// </summary>
|
|
public string? DisplayName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 手机号码
|
|
/// </summary>
|
|
public string? Phone { get; set; }
|
|
|
|
/// <summary>
|
|
/// 邮件地址
|
|
/// </summary>
|
|
public string MailAddress { get; set; }
|
|
|
|
/// <summary>
|
|
/// 个人签名内容
|
|
/// </summary>
|
|
public string? SignatureHtml { get; set; }
|
|
}
|
|
|
|
public class MailReceiver
|
|
{
|
|
/// <summary>
|
|
/// 显示名称
|
|
/// </summary>
|
|
public string DisplayName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 邮件地址
|
|
/// </summary>
|
|
public string MailAddress { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 文件附件
|
|
/// </summary>
|
|
public class FileAttachment
|
|
{
|
|
/// <summary>
|
|
/// 文件物理路径
|
|
/// </summary>
|
|
public string FilePath { get; set; }
|
|
|
|
/// <summary>
|
|
/// 附件显示的名称(为空时显示原始文件名)
|
|
/// </summary>
|
|
public string? DisplayName { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 联系人
|
|
/// </summary>
|
|
public class Contact
|
|
{
|
|
/// <summary>
|
|
/// 联系人ID
|
|
/// </summary>
|
|
public long Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// 登录账号
|
|
/// </summary>
|
|
public string? Code { get; set; }
|
|
|
|
/// <summary>
|
|
/// 中文姓名
|
|
/// </summary>
|
|
public string? Name { get; set; }
|
|
|
|
/// <summary>
|
|
/// 英文名
|
|
/// </summary>
|
|
public string? EnName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 座机
|
|
/// </summary>
|
|
public string? Tel { get; set; }
|
|
|
|
/// <summary>
|
|
/// 手机号/微信
|
|
/// </summary>
|
|
public string? Mobile { get; set; }
|
|
|
|
/// <summary>
|
|
/// QQ号
|
|
/// </summary>
|
|
public string? QQ { get; set; }
|
|
|
|
/// <summary>
|
|
/// 邮箱
|
|
/// </summary>
|
|
public string? Email { get; set; }
|
|
|
|
/// <summary>
|
|
/// 类型
|
|
/// </summary>
|
|
public string? CustomerType { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 邮件模板模型
|
|
/// </summary>
|
|
/// <typeparam name="T">数据类型</typeparam>
|
|
public class MailTemplateModel<T> : MailTemplateModel
|
|
{
|
|
/// <summary>
|
|
/// 主要数据项
|
|
/// </summary>
|
|
public new T Primary { get; internal set; }
|
|
|
|
/// <summary>
|
|
/// 初始化
|
|
/// </summary>
|
|
/// <param name="primary">主数据</param>
|
|
public MailTemplateModel(T primary)
|
|
{
|
|
Primary = primary;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 邮件模板模型
|
|
/// </summary>
|
|
/// <typeparam name="T1">主要数据类型</typeparam>
|
|
/// <typeparam name="T2">次要数据类型</typeparam>
|
|
public class MailTemplateModel<T1, T2> : MailTemplateModel<T1>
|
|
{
|
|
/// <summary>
|
|
/// 次要数据项
|
|
/// </summary>
|
|
public T2 Secondary { get; internal set; }
|
|
|
|
/// <summary>
|
|
/// 初始化
|
|
/// </summary>
|
|
/// <param name="primary">主数据</param>
|
|
/// <param name="secondary">主数据</param>
|
|
public MailTemplateModel(T1 primary, T2 secondary) : base(primary)
|
|
{
|
|
Secondary = secondary;
|
|
}
|
|
}
|
|
}
|