using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.System.Dtos;
///
/// 系统编码请求实体
///
public class SequenceReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 权限ID
///
public long PermissionId { get; set; }
///
/// 权限实体
///
public string PermissionEntity { get; set; }= "";
///
/// 名称
///
public string SequenceName { get; set; }= "";
///
/// 分隔符
///
public string SequenceDelimiter { get; set; }= "";
///
/// 序号重置规则
///
public string SequenceReset { get; set; } = "";
///
/// 步长
///
public int Step { get; set; } = 0;
///
/// 当前值
///
public int CurrentNo { get; set; }= 0;
///
/// 当前编码
///
public string CurrentCode { get; set; }= "";
///
/// 当前重置依赖,即最后一次获取编码的日期
///
public string CurrentReset { get; set; }= "";
///
/// 排序
///
public int? OrderNo { get; set; } = 100;
///
/// 状态 0 启用 1 禁用
///
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
public string Note { get; set; } = "";
}
///
/// 验证
///
public class SysSequenceReqValidator : AbstractValidator
{
///
/// 构造函数
///
public SysSequenceReqValidator()
{
this.RuleFor(o => o.PermissionId)
.NotEmpty().WithName("权限模块Id");
this.RuleFor(o => o.SequenceName)
.NotEmpty().WithName("名称");
}
}