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.
64 lines
1.4 KiB
C#
64 lines
1.4 KiB
C#
5 months ago
|
using DS.Module.Core;
|
||
|
using FluentValidation;
|
||
|
|
||
|
namespace DS.WMS.Core.Sys.Dtos;
|
||
|
|
||
|
/// <summary>
|
||
|
/// 租户参数请求实体
|
||
|
/// </summary>
|
||
|
public class TenantParamDataReq
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 主键Id
|
||
|
/// </summary>
|
||
|
public long Id { get; set; }
|
||
|
/// <summary>
|
||
|
/// 参数类型Id
|
||
|
/// </summary>
|
||
|
public long ParamId { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 参数类型Code
|
||
|
/// </summary>
|
||
|
public string ParamCode { get; set; }
|
||
|
/// <summary>
|
||
|
/// 参数代码
|
||
|
/// </summary>
|
||
|
public string ItemCode { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 参数名称
|
||
|
/// </summary>
|
||
|
public string ItemName { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 排序
|
||
|
/// </summary>
|
||
|
public int? OrderNo { get; set; } = 100;
|
||
|
|
||
|
/// <summary>
|
||
|
/// 状态 0 启用 1 禁用
|
||
|
/// </summary>
|
||
|
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||
|
/// <summary>
|
||
|
/// 备注
|
||
|
/// </summary>
|
||
|
public string Note { get; set; } = "";
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 验证
|
||
|
/// </summary>
|
||
|
public class TenantParamDataReqValidator : AbstractValidator<TenantParamDataReq>
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 构造函数
|
||
|
/// </summary>
|
||
|
public TenantParamDataReqValidator()
|
||
|
{
|
||
|
this.RuleFor(o => o.ItemCode)
|
||
|
.NotEmpty().WithName("参数代码");
|
||
|
this.RuleFor(o => o.ItemName)
|
||
|
.NotEmpty().WithName("参数名称");
|
||
|
}
|
||
|
}
|