using DS.Module.Core; 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 CodeName { get; set; } /// /// Desc:联系人简称 /// public string ShortName { get; set; } /// /// Desc:职务 /// public string Job { 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; } = false; /// /// Desc:是否为财务 /// public bool? IsFinancialStaff { get; set; } = false; /// /// Desc:是否为销售 /// public bool? IsSaleMan { get; set; } = false; /// /// Desc:是否为其他 /// public bool? IsOther { get; set; } = false; /// /// Desc:是否保险联系人 /// public bool? IsInsurance { get; set; } = false; /// /// Desc:是否对账联系人 /// public bool? IsCheckAccount { get; set; } = false; /// /// 提醒日期1 /// public DateTime Anniversary1 { get; set; } /// /// 提醒日期2 /// public DateTime Anniversary2 { get; set; } /// /// 提醒备注1 /// public string AnniversaryNote1 { get; set; } /// /// 提醒备注2 /// public string AnniversaryNote2 { 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.CodeName) .NotEmpty().WithName("联系人代码"); this.RuleFor(o => o.ShortName) .NotEmpty().WithName("联系人简称"); } }