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.
51 lines
984 B
C#
51 lines
984 B
C#
12 months ago
|
using FluentValidation;
|
||
|
|
||
7 months ago
|
namespace DS.WMS.Core.Sys.Dtos;
|
||
12 months ago
|
|
||
|
/// <summary>
|
||
|
/// 租户编辑实体
|
||
|
/// </summary>
|
||
11 months ago
|
public class TenantReq
|
||
12 months ago
|
{
|
||
|
/// <summary>
|
||
|
///
|
||
|
/// </summary>
|
||
11 months ago
|
public long Id { get; set; }
|
||
12 months ago
|
|
||
|
/// <summary>
|
||
|
/// 名称
|
||
|
/// </summary>
|
||
|
public string Name { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
11 months ago
|
/// 唯一编码
|
||
12 months ago
|
/// </summary>
|
||
11 months ago
|
public string TaxNo { get; set; }
|
||
12 months ago
|
|
||
|
/// <summary>
|
||
|
/// 电话
|
||
|
/// </summary>
|
||
|
public string Phone { get; set; } = "";
|
||
|
|
||
|
/// <summary>
|
||
|
/// 邮箱
|
||
|
/// </summary>
|
||
|
public string Email { get; set; } = "";
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 验证
|
||
|
/// </summary>
|
||
11 months ago
|
public class TenantInputValidator : AbstractValidator<TenantReq>
|
||
12 months ago
|
{
|
||
|
/// <summary>
|
||
|
/// 构造函数
|
||
|
/// </summary>
|
||
|
public TenantInputValidator()
|
||
|
{
|
||
|
this.RuleFor(o => o.Name)
|
||
|
.NotEmpty().WithName("租户名称");
|
||
11 months ago
|
this.RuleFor(o => o.TaxNo)
|
||
12 months ago
|
.NotEmpty().WithName("租户唯一编码");
|
||
|
}
|
||
|
}
|