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.

44 lines
1.1 KiB
C#

using DS.WMS.Core.Op.EDI;
using DS.WMS.Core.Op.Entity;
using FluentValidation;
namespace DS.WMS.Core.Info.Dtos;
/// <summary>
/// 根据代码获取客户下拉及业务信息请求实体
/// </summary>
public class ClientSelectInfoReq
{
/// <summary>
/// 业务类型 1 海运出口 2 海运进口
/// </summary>
public BusinessType BusinessType { get; set; }
/// <summary>
/// 业务Id
/// </summary>
public long BusinessId { get; set; }
/// <summary>
/// Desc:客户类型代码
/// </summary>
public string Code { get; set; }
}
/// <summary>
/// 验证
/// </summary>
public class ClientSelectInfoReqValidator : AbstractValidator<ClientSelectInfoReq>
{
/// <summary>
/// 构造函数
/// </summary>
public ClientSelectInfoReqValidator()
{
this.RuleFor(o => o.Code)
.NotEmpty().WithName("客户类型代码");
this.RuleFor(o => o.BusinessId)
.NotEmpty().WithName("业务Id");
this.RuleFor(o => o.BusinessType)
.NotEmpty().WithName("业务类型");
}
}