feat:新增自定义字典功能
This commit is contained in:
28
ZR.Model/System/Dto/SysDictTypeDto.cs
Normal file
28
ZR.Model/System/Dto/SysDictTypeDto.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ZR.Model.System.Dto
|
||||
{
|
||||
public class SysDictTypeDto
|
||||
{
|
||||
public long DictId { get; set; }
|
||||
/// <summary>
|
||||
/// 字典名称
|
||||
/// </summary>
|
||||
public string DictName { get; set; }
|
||||
/// <summary>
|
||||
/// 字典类型
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "字典类型不能为空")]
|
||||
[RegularExpression(pattern: "^[a-z][a-z0-9_]*$", ErrorMessage = "字典类型必须以字母开头,且字典类型只能由小写字母或加下划线还有数字组成")]
|
||||
public string DictType { get; set; }
|
||||
public string Status { get; set; }
|
||||
/// <summary>
|
||||
/// 系统内置 Y是 N否
|
||||
/// </summary>
|
||||
public string Type { get; set; }
|
||||
/// <summary>
|
||||
/// 自定义sql
|
||||
/// </summary>
|
||||
public string CustomSql { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,4 @@
|
||||
//using Dapper.Contrib.Extensions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
using SqlSugar;
|
||||
|
||||
namespace ZR.Model.System
|
||||
{
|
||||
@@ -13,11 +9,10 @@ namespace ZR.Model.System
|
||||
[SugarTable("sys_dict_data")]
|
||||
public class SysDictData: SysBase
|
||||
{
|
||||
//[Key]
|
||||
/// <summary>
|
||||
/// 字典主键
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]//主键并且自增 (string不能设置自增)
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public long DictCode{ get; set; }
|
||||
public int DictSort { get; set; }
|
||||
public string DictLabel { get; set; }
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace ZR.Model.System
|
||||
/// <summary>
|
||||
/// 字典主键
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]//主键并且自增 (string不能设置自增)
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public long DictId { get; set; }
|
||||
/// <summary>
|
||||
/// 字典名称
|
||||
@@ -32,5 +32,9 @@ namespace ZR.Model.System
|
||||
/// 系统内置 Y是 N否
|
||||
/// </summary>
|
||||
public string Type { get; set; }
|
||||
/// <summary>
|
||||
/// 自定义sql
|
||||
/// </summary>
|
||||
public string CustomSql { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user