using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Code.Dtos;
///
/// 租户表单字段复制设置请求实体
///
public class CodeFormCopyReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 权限Id
///
public long? PermissionId { get; set; }
///
/// 权限模块名称
///
public string PermissionName { get; set; }
///
/// 字段复制设置
///
public string Content { get; set; }
///
/// 模板名称
///
public string TemplateName { get; set; }
///
/// 中文视图名
///
public string ColumnView { get; set; }
///
/// 排序
///
public int? OrderNo { get; set; } = 100;
///
/// 状态 0 启用 1 禁用
///
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
public string Note { get; set; } = "";
}
///
/// 验证
///
public class CodeFormCopyReqValidator : AbstractValidator
{
///
/// 构造函数
///
public CodeFormCopyReqValidator()
{
this.RuleFor(o => o.PermissionId)
.NotEmpty().WithName("权限模块Id");
this.RuleFor(o => o.Content)
.NotEmpty().WithName("字段复制设置");
}
}