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