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.

69 lines
1.7 KiB
C#

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
{
/// <summary>
/// 自定义列表字段设置请求
/// </summary>
public class CustomColumnSetReq
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 自定义列表Code
/// </summary>
public string CustomTableCode { get; set; }
/// <summary>
/// 模板名称
/// </summary>
public string TemplateName { get; set; }
/// <summary>
/// 列表设置
/// </summary>
public string Content { get; set; }
/// <summary>
/// 排序
/// </summary>
public int? OrderNo { get; set; } = 100;
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}
/// <summary>
/// 验证
/// </summary>
public class CustomColumnSetReqValidator : AbstractValidator<CustomColumnSetReq>
{
/// <summary>
/// 构造函数
/// </summary>
public CustomColumnSetReqValidator()
{
this.RuleFor(o => o.CustomTableCode)
.NotEmpty().WithName("自定义列表Code");
this.RuleFor(o => o.Content)
.NotEmpty().WithName("列表设置");
}
}
}