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.
85 lines
1.9 KiB
C#
85 lines
1.9 KiB
C#
using DS.Module.Core;
|
|
using FluentValidation;
|
|
|
|
namespace DS.WMS.Core.Sys.Dtos;
|
|
|
|
/// <summary>
|
|
/// 系统编码请求实体
|
|
/// </summary>
|
|
public class SequenceReq
|
|
{
|
|
/// <summary>
|
|
/// 主键Id
|
|
/// </summary>
|
|
public long Id { get; set; }
|
|
/// <summary>
|
|
/// 权限ID
|
|
/// </summary>
|
|
public long PermissionId { get; set; }
|
|
/// <summary>
|
|
/// 权限实体
|
|
/// </summary>
|
|
public string PermissionEntity { get; set; }= "";
|
|
|
|
/// <summary>
|
|
/// 名称
|
|
/// </summary>
|
|
public string SequenceName { get; set; }= "";
|
|
/// <summary>
|
|
/// 分隔符
|
|
/// </summary>
|
|
public string SequenceDelimiter { get; set; }= "";
|
|
|
|
/// <summary>
|
|
/// 序号重置规则
|
|
/// </summary>
|
|
public string SequenceReset { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 步长
|
|
/// </summary>
|
|
public int Step { get; set; } = 0;
|
|
/// <summary>
|
|
/// 当前值
|
|
/// </summary>
|
|
public int CurrentNo { get; set; }= 0;
|
|
/// <summary>
|
|
/// 当前编码
|
|
/// </summary>
|
|
public string CurrentCode { get; set; }= "";
|
|
/// <summary>
|
|
/// 当前重置依赖,即最后一次获取编码的日期
|
|
/// </summary>
|
|
public string CurrentReset { 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 SysSequenceReqValidator : AbstractValidator<SequenceReq>
|
|
{
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
public SysSequenceReqValidator()
|
|
{
|
|
this.RuleFor(o => o.PermissionId)
|
|
.NotEmpty().WithName("权限模块Id");
|
|
this.RuleFor(o => o.SequenceName)
|
|
.NotEmpty().WithName("名称");
|
|
}
|
|
} |