修复租户库插入无默认数据问题
parent
737bd7dd06
commit
8058ba1cc0
@ -0,0 +1,85 @@
|
||||
using DS.Module.Core;
|
||||
using FluentValidation;
|
||||
|
||||
namespace DS.WMS.Core.System.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 数据权限请求实体
|
||||
/// </summary>
|
||||
public class SysSequenceReq
|
||||
{
|
||||
/// <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<SysSequenceReq>
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
public SysSequenceReqValidator()
|
||||
{
|
||||
this.RuleFor(o => o.PermissionId)
|
||||
.NotEmpty().WithName("权限模块Id");
|
||||
this.RuleFor(o => o.SequenceName)
|
||||
.NotEmpty().WithName("名称");
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
using DS.Module.Core;
|
||||
|
||||
namespace DS.WMS.Core.System.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 数据权限返回实体
|
||||
/// </summary>
|
||||
public class SysSequenceRes
|
||||
{
|
||||
/// <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>
|
||||
/// 状态 0 启用 1 禁用
|
||||
/// </summary>
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Note { get; set; } = "";
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int? OrderNo { get; set; } = 100;
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Data;
|
||||
|
||||
namespace DS.WMS.Core.System.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 系统编码表
|
||||
/// </summary>
|
||||
[SqlSugar.SugarTable("sys_sequence","系统编码表")]
|
||||
public class SysSequence : BaseTenantModel<long>
|
||||
{
|
||||
/// <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; }
|
||||
/// <summary>
|
||||
/// 当前值
|
||||
/// </summary>
|
||||
public int CurrentNo { get; set; }
|
||||
/// <summary>
|
||||
/// 当前编码
|
||||
/// </summary>
|
||||
public string CurrentCode { get; set; }
|
||||
/// <summary>
|
||||
/// 当前重置依赖,即最后一次获取编码的日期
|
||||
/// </summary>
|
||||
public string CurrentReset { get; set; }
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
[SqlSugar.SugarColumn(ColumnDescription = "状态")]
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
/// <summary>
|
||||
/// 排序号
|
||||
/// </summary>
|
||||
public string OrderNo { get; set; }
|
||||
}
|
Loading…
Reference in New Issue