using System.Runtime.Serialization;
using DS.Module.Core;
using DS.Module.Core.Extensions;
using FluentValidation;
namespace DS.WMS.Core.Info.Dtos;
///
/// 客户联系人请求实体
///
public class ClientContactReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 客户Id
///
public long ClientId { get; set; }
///
/// Desc:联系人姓名
///
public string Name { get; set; }
///
/// Desc:联系人英文名
///
public string? EnName { get; set; }
///
/// Desc:职务
///
[IgnoreDataMember]
public string? Job => Jobs == null ? null : string.Join(",", Jobs);
///
/// 职务
///
public string[]? Jobs { get; set; }
///
/// Desc:通讯地址
///
public string Address { get; set; }
///
/// Desc:邮箱
///
public string Email { get; set; }
///
/// Desc:手机
///
public string Mobile { get; set; }
///
/// Desc:电话
///
public string Tel { get; set; }
///
/// Desc:传真
///
public string Fax { get; set; }
///
/// Desc:QQ
///
public string QQ { get; set; }
///
/// Desc:是否为操作
///
public bool IsOperator { get; set; }
///
/// Desc:是否为财务
///
public bool IsFinancialStaff { get; set; }
///
/// Desc:是否为销售
///
public bool IsSaleMan { get; set; }
///
/// Desc:是否为其他
///
public bool IsOther { get; set; }
///
/// Desc:是否保险联系人
///
public bool IsInsurance { get; set; }
///
/// Desc:是否对账联系人
///
public bool IsCheckAccount { get; set; }
///
/// 提醒日期1
///
public DateTime? Anniversary1 { get; set; }
///
/// 提醒日期2
///
public DateTime? Anniversary2 { get; set; }
///
/// 提醒备注1
///
public string? AnniversaryNote1 { get; set; }
///
/// 提醒备注2
///
public string? AnniversaryNote2 { get; set; }
/////
///// 船公司Id
/////
//public long? CarrierId { get; set; }
/////
///// 船公司
/////
//public string? Carrier { get; set; }
///
/// 状态 0 启用 1 禁用
///
public StatusEnum Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
public string? Note { get; set; }
}
///
/// 验证
///
public class ClientContactReqValidator : AbstractValidator
{
///
/// 构造函数
///
public ClientContactReqValidator()
{
this.RuleFor(o => o.Name)
.NotEmpty().WithName("联系人姓名");
}
}