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.

154 lines
3.2 KiB
C#

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