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