using DS.Module.Core;
using FluentValidation;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Code.Dtos
{
///
/// 列表字段设置请求
///
public class ColumnSetReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 权限Id
///
public long? PermissionId { get; set; }
///
/// 列表序号
///
public int ColumnNo { get; set; } = 0;
///
/// 权限模块名称
///
public string PermissionName { get; set; }
///
/// 模板名称
///
public string TemplateName { get; set; }
///
/// 列表设置
///
public string Content { get; set; }
///
/// 排序
///
public int? OrderNo { get; set; } = 100;
///
/// 状态 0 启用 1 禁用
///
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
public string Note { get; set; } = "";
}
///
/// 验证
///
public class ColumnSetReqValidator : AbstractValidator
{
///
/// 构造函数
///
public ColumnSetReqValidator()
{
this.RuleFor(o => o.PermissionId)
.NotEmpty().WithName("权限模块Id");
this.RuleFor(o => o.TemplateName)
.NotEmpty().WithName("模板名称");
this.RuleFor(o => o.Content)
.NotEmpty().WithName("列表设置");
}
}
}