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.
59 lines
1.3 KiB
C#
59 lines
1.3 KiB
C#
4 months ago
|
using DS.Module.Core;
|
||
|
using FluentValidation;
|
||
|
|
||
|
namespace DS.WMS.Core.Sys.Dtos;
|
||
|
|
||
|
/// <summary>
|
||
|
/// 租户参数类型请求实体
|
||
|
/// </summary>
|
||
|
public class TenantParamReq
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 主键Id
|
||
|
/// </summary>
|
||
|
public long Id { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 名称
|
||
|
/// </summary>
|
||
|
public string ParamName { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 编码
|
||
|
/// </summary>
|
||
|
public string ParamCode { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 类型
|
||
|
/// </summary>
|
||
|
public string Type { 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 TenantParamReqValidator : AbstractValidator<TenantParamReq>
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 构造函数
|
||
|
/// </summary>
|
||
|
public TenantParamReqValidator()
|
||
|
{
|
||
|
this.RuleFor(o => o.ParamName)
|
||
|
.NotEmpty().WithName("租户参数类型名称");
|
||
|
this.RuleFor(o => o.ParamCode)
|
||
|
.NotEmpty().WithName("租户参数类型唯一编码");
|
||
|
}
|
||
|
}
|