diff --git a/src/InterfaceForward.Domain/Aggregates/DictionaryAggregate/DictionaryEntity.cs b/src/InterfaceForward.Domain/Aggregates/DictionaryAggregate/DictionaryEntity.cs index 357655b..6fe8485 100644 --- a/src/InterfaceForward.Domain/Aggregates/DictionaryAggregate/DictionaryEntity.cs +++ b/src/InterfaceForward.Domain/Aggregates/DictionaryAggregate/DictionaryEntity.cs @@ -1,19 +1,41 @@ -using System; -using Fake.DomainDrivenDesign.Entities.Auditing; - -namespace InterfaceForward.Domain.Aggregates.DictionaryAggregate; - -public class DictionaryEntity:FullAuditedAggregate +namespace SJZY.InterfaceRelay.Repository.Dictionary.Entitys { - public string Name { get; private set; } - public string Code { get; private set; } - public string? Description { get; private set; } - - - public DictionaryEntity(string name, string code, string? description) + /// + /// 字典表 + /// + [SugarTable("t_dictionary")] + public class DictionaryEntity : IFullAuditedBasicEntitys { - Name = name; - Code = code; - Description = description; + + /// + /// 自增主键 + /// + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } + + /// + /// 类型 + /// + [SugarColumn(ColumnName = "Type")] + public string Type { get; set; } + + /// + /// 名称 + /// + [SugarColumn(ColumnName = "Name")] + public string Name { get; set; } + + /// + /// 字典描述 + /// + [SugarColumn(ColumnName = "Description")] + public string Description { get; set; } + + /// + /// 排序 + /// + [SugarColumn(ColumnName = "Sort")] + public int Sort { get; set; } + } } \ No newline at end of file diff --git a/src/InterfaceForward.Domain/Aggregates/DictionaryAggregate/DictionaryItemEntity.cs b/src/InterfaceForward.Domain/Aggregates/DictionaryAggregate/DictionaryItemEntity.cs deleted file mode 100644 index 968a595..0000000 --- a/src/InterfaceForward.Domain/Aggregates/DictionaryAggregate/DictionaryItemEntity.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using Fake.DomainDrivenDesign.Entities.Auditing; - -namespace InterfaceForward.Domain.Aggregates.DictionaryAggregate; - -public class DictionaryItemEntity : FullAuditedEntity -{ - public DictionaryItemEntity(Guid dictionaryId, string name, int value, int sort, string? description = null) - { - DictionaryId = dictionaryId; - Name = name; - Value = value; - Sort = sort; - Description = description; - } - - public Guid DictionaryId { get; private set; } - public string Name { get; private set; } - public int Value { get; private set; } - public int Sort { get; private set; } - public string? Description { get; private set; } -} \ No newline at end of file diff --git a/src/InterfaceForward.Domain/Aggregates/DictionaryAggregate/IDictionaryRepository.cs b/src/InterfaceForward.Domain/Aggregates/DictionaryAggregate/IDictionaryRepository.cs new file mode 100644 index 0000000..566f941 --- /dev/null +++ b/src/InterfaceForward.Domain/Aggregates/DictionaryAggregate/IDictionaryRepository.cs @@ -0,0 +1,12 @@ +using SJZY.InterfaceRelay.Repository.Dictionary.Entitys; + +namespace SJZY.InterfaceRelay.Repository.Dictionary.Services +{ + /// + /// 字典仓储 + /// + public interface IDictionaryRepository + { + ISugarQueryable AsQueryable(); + } +}