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.
44 lines
1.2 KiB
44 lines
1.2 KiB
3 weeks ago
|
using SqlSugar;
|
||
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.ComponentModel.DataAnnotations;
|
||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||
|
using WoodWood.Util.Validations;
|
||
|
|
||
|
namespace Wood.Entity.SystemManage
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 字典类型信息
|
||
|
/// </summary>
|
||
|
[SugarTable("SysDataDict", "字典类型信息")]
|
||
|
[SugarIndex("SysDataDict_FormCode", nameof(FormCode), OrderByType.Desc, true)]
|
||
|
public class DataDictEntity : EntityBaseExtra
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 名称
|
||
|
/// </summary>
|
||
|
[SugarColumn(ColumnDescription = "名称",Length =64)]
|
||
|
[Required(ErrorMessage = "必须填写字典类型名称!")]
|
||
|
public string DictName { get; set; } = "";
|
||
|
|
||
|
/// <summary>
|
||
|
/// 编码
|
||
|
/// </summary>
|
||
|
[SugarColumn(ColumnDescription = "编码", Length = 32)]
|
||
|
[Required]
|
||
|
[UniqueValue(ErrorMessage ="编码不能重复!")]
|
||
|
public string FormCode { get; set; } = "";
|
||
|
/// <summary>
|
||
|
/// 排序
|
||
|
/// </summary>
|
||
|
[SugarColumn(ColumnDescription = "排序")]
|
||
|
public int Sort { get; set; } = 0;
|
||
|
|
||
|
/// <summary>
|
||
|
/// 字典明细信息
|
||
|
/// </summary>
|
||
|
[Navigate( NavigateType.OneToMany, nameof(DataDictDetailEntity.DictTypeId))]//注意顺序
|
||
|
public List<DataDictDetailEntity>? Details { get; set; }
|
||
|
}
|
||
|
}
|