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.

62 lines
1.3 KiB
C#

2 years ago
using FluentValidation;
namespace DS.WMS.Core.System.Dtos;
/// <summary>
/// 租户编辑实体
/// </summary>
public class TenantInput
{
/// <summary>
///
/// </summary>
public string Id { get; set; }
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 编码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 电话
/// </summary>
public string Phone { get; set; } = "";
/// <summary>
/// 邮箱
/// </summary>
public string Email { get; set; }= "";
/// <summary>
/// 数据库类型
/// </summary>
public int? DbType { get; set; } = 0;
/// <summary>
/// 租户类型
/// </summary>
public int? TenantType { get; set; } = 0;
/// <summary>
/// 数据库链接
/// </summary>
public string Connection { get; set; }= "";
}
/// <summary>
/// 验证
/// </summary>
public class TenantInputValidator : AbstractValidator<TenantInput>
{
/// <summary>
/// 构造函数
/// </summary>
public TenantInputValidator()
{
this.RuleFor(o => o.Name)
.NotEmpty().WithName("租户名称");
this.RuleFor(o => o.Code)
.NotEmpty().WithName("租户唯一编码");
}
}