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