You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.3 KiB
48 lines
1.3 KiB
using SqlSugar;
|
|
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using WoodWood.Util.Validations;
|
|
|
|
namespace Wood.Entity.SystemManage
|
|
{
|
|
/// <summary>
|
|
/// 字典详细信息
|
|
/// </summary>
|
|
[SugarTable("SysDataDictDetail", "字典详细信息")]
|
|
[SugarIndex("SysDataDictDetail_DictKey", nameof(DictKey), OrderByType.Desc, true)]
|
|
public class DataDictDetailEntity : EntityBaseExtra
|
|
{
|
|
/// <summary>
|
|
/// 字典类型
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "字典类型")]
|
|
[Required]
|
|
public long DictTypeId { get; set; }
|
|
/// <summary>
|
|
/// 字典键
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[SugarColumn(ColumnDescription = "字典键", Length = 32)]
|
|
[Required]
|
|
[UniqueValue(ErrorMessage ="字典Key不能重复!")]
|
|
public string DictKey { get; set; } = "";
|
|
/// <summary>
|
|
/// 字典值
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[SugarColumn(ColumnDescription = "字典值", Length = 32)]
|
|
[Required]
|
|
public string DictValue { get; set; } = "";
|
|
/// <summary>
|
|
/// 排序
|
|
/// </summary>
|
|
[SugarColumn(ColumnDescription = "排序")]
|
|
public int Sort { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// DataDictEntity
|
|
/// </summary>
|
|
[Navigate(NavigateType.OneToOne, nameof(DictTypeId), nameof(DataDictEntity.Id))]
|
|
public DataDictEntity? DataDict{ get; set; }//不要给get set赋值
|
|
}
|
|
}
|
|
|