1
This commit is contained in:
parent
bf8c250e96
commit
6eaf7d466c
@ -1,19 +1,41 @@
|
||||
using System;
|
||||
using Fake.DomainDrivenDesign.Entities.Auditing;
|
||||
|
||||
namespace InterfaceForward.Domain.Aggregates.DictionaryAggregate;
|
||||
|
||||
public class DictionaryEntity:FullAuditedAggregate<Guid>
|
||||
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)
|
||||
///<summary>
|
||||
/// 字典表
|
||||
///</summary>
|
||||
[SugarTable("t_dictionary")]
|
||||
public class DictionaryEntity : IFullAuditedBasicEntitys
|
||||
{
|
||||
Name = name;
|
||||
Code = code;
|
||||
Description = description;
|
||||
|
||||
///<summary>
|
||||
/// 自增主键
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
///<summary>
|
||||
/// 类型
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Type")]
|
||||
public string Type { get; set; }
|
||||
|
||||
///<summary>
|
||||
/// 名称
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
///<summary>
|
||||
/// 字典描述
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
///<summary>
|
||||
/// 排序
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "Sort")]
|
||||
public int Sort { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
using System;
|
||||
using Fake.DomainDrivenDesign.Entities.Auditing;
|
||||
|
||||
namespace InterfaceForward.Domain.Aggregates.DictionaryAggregate;
|
||||
|
||||
public class DictionaryItemEntity : FullAuditedEntity<Guid>
|
||||
{
|
||||
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; }
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
using SJZY.InterfaceRelay.Repository.Dictionary.Entitys;
|
||||
|
||||
namespace SJZY.InterfaceRelay.Repository.Dictionary.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// 字典仓储
|
||||
/// </summary>
|
||||
public interface IDictionaryRepository
|
||||
{
|
||||
ISugarQueryable<DictionaryEntity> AsQueryable();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user