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
987 B
C#

12 months ago
using FluentValidation;
namespace DS.WMS.Core.System.Dtos;
/// <summary>
/// 租户编辑实体
/// </summary>
11 months ago
public class TenantReq
12 months ago
{
/// <summary>
///
/// </summary>
public long Id { get; set; }
12 months ago
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 唯一编码
12 months ago
/// </summary>
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("租户名称");
this.RuleFor(o => o.TaxNo)
12 months ago
.NotEmpty().WithName("租户唯一编码");
}
}