using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Info.Dtos;
///
/// 客户合同请求实体
///
public class ClientContractReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 客户Id
///
public long ClientId { get; set; }
///
/// Desc:合同号
///
public string ContractNo { get; set; }
///
/// Desc:签订日期
///
public DateTime SignDate { get; set; }
///
/// Desc:起始日期
///
public DateTime StartDate { get; set; }
///
/// Desc:截止日期
///
public DateTime EndDate { get; set; }
///
/// Desc:负责人
///
public string Chief { get; set; }
///
/// Desc:签订部门Id
///
public long DeptId { get; set; }
///
/// Desc:合同名称
///
public string ContractName { get; set; }
///
/// 状态 0 启用 1 禁用
///
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
public string Note { get; set; } = "";
}
///
/// 验证
///
public class ClientContractReqValidator : AbstractValidator
{
///
/// 构造函数
///
public ClientContractReqValidator()
{
this.RuleFor(o => o.ContractNo)
.NotEmpty().WithName("合同号");
this.RuleFor(o => o.ContractName)
.NotEmpty().WithName("合同名称");
}
}