using DS.Module.Core;
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Info.Dtos
{
///
/// 往来单位参数请求实体
///
public class ClientParamReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 参数类型Id
///
public long ParamId { get; set; }
///
/// 名称
///
public string ParamName { get; set; }
///
/// 参数类型Code
///
public string ParamCode { get; set; }
///
/// 参数类型
///
public string ParamType { get; set; }
///
/// 参数代码
///
public string ItemCode { get; set; }
///
/// 参数名称
///
public string ItemName { get; set; }
///
/// 往来单位
///
public string CustomerName { get; set; }
///
/// 往来单位Id
///
public long CustomerId { get; set; }
///
/// 排序
///
public int? OrderNo { get; set; } = 100;
///
/// 状态
///
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
public string Note { get; set; }
}
///
/// 验证
///
public class InfoClientParamReqValidator : AbstractValidator
{
///
/// 构造函数
///
public InfoClientParamReqValidator()
{
this.RuleFor(o => o.CustomerId)
.NotEmpty().WithName("往来单位");
this.RuleFor(o => o.ParamId)
.NotEmpty().WithName("参数类型");
this.RuleFor(o => o.ItemCode)
.NotEmpty().WithName("参数代码");
}
}
}