| | |
| | | /// <summary> |
| | | /// 字典数据 |
| | | /// </summary> |
| | | public class DictionaryData : CommonEntity, IEntityTypeBuilder<DictionaryData> |
| | | public class DictionaryData : CommonEntity, IEntityTypeBuilder<DictionaryData>, ITreeData<DictionaryData>, IIsDisabled |
| | | { |
| | | public DictionaryData() |
| | | { |
| | |
| | | /// 编号 |
| | | /// </summary> |
| | | [MaxLength(128)] |
| | | [Required] |
| | | public string Code { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | public void Configure(EntityTypeBuilder<DictionaryData> entityBuilder, DbContext dbContext, Type dbContextLocator) |
| | | { |
| | | entityBuilder.HasIndex(x => x.Code).IsUnique(); |
| | | entityBuilder |
| | | .HasMany(x => x.Children) |
| | | .WithOne(x => x.Parent) |