精简实体准备
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
0689f731b7
commit
3701d8bcd9
|
@ -17,4 +17,52 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
abstract TKey Id { get; set; }
|
abstract TKey Id { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 减少实体属性,增加基类
|
||||||
|
|
||||||
|
public abstract class BaseAuditAddEntity : Entity, IAuditAdd
|
||||||
|
{
|
||||||
|
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract class BaseFullAuditEntity : Entity, IAuditUpdate, IAuditAdd
|
||||||
|
{
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
public Guid UpdateUserId { get; set; }
|
||||||
|
public DateTime UpdateTime { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public abstract class BaseFullAuditDeleteEntity : Entity, IAuditUpdate, IAuditAdd, ISoftDelete
|
||||||
|
{
|
||||||
|
public Guid? DeleteUserId { get; set; }
|
||||||
|
public bool IsDeleted { get; set; }
|
||||||
|
public DateTime? DeletedTime { get; set; }
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
public Guid UpdateUserId { get; set; }
|
||||||
|
public DateTime UpdateTime { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public abstract class BaseAuditAddEntityWithUserName : Entity, IAuditAddWithUserName
|
||||||
|
{
|
||||||
|
public string CreateUser { get; set; }
|
||||||
|
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract class BaseAuditUpdateEntity : Entity, IAuditUpdate
|
||||||
|
{
|
||||||
|
public Guid UpdateUserId { get; set; }
|
||||||
|
public DateTime UpdateTime { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,9 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
public interface IAuditAddWithUserName : IAuditAdd<Guid>
|
public interface IAuditAddWithUserName : IAuditAdd<Guid>
|
||||||
{
|
{
|
||||||
string CreateUser { get; set; }
|
public string CreateUser { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public interface IAuditUpdate<TKey> where TKey : struct
|
public interface IAuditUpdate<TKey> where TKey : struct
|
||||||
{
|
{
|
||||||
public TKey UpdateUserId { get; set; }
|
public TKey UpdateUserId { get; set; }
|
||||||
//string UpdateUserName { get; set; }
|
|
||||||
public DateTime UpdateTime { get; set; }
|
public DateTime UpdateTime { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,4 +12,9 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,15 +2,17 @@
|
||||||
|
|
||||||
namespace IRaCIS.Core.Domain.Models
|
namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
|
public interface ISoftDelete<TKey> where TKey : struct
|
||||||
|
|
||||||
public interface ISoftDelete
|
|
||||||
{
|
{
|
||||||
bool IsDeleted { get; set; }
|
public TKey? DeleteUserId { get; set; }
|
||||||
|
public bool IsDeleted { get; set; }
|
||||||
|
|
||||||
public DateTime? DeletedTime { get; set; }
|
public DateTime? DeletedTime { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ISoftDelete : ISoftDelete<Guid>
|
||||||
|
{
|
||||||
|
|
||||||
public Guid? DeleteUserId { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,82 +9,30 @@ using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
namespace IRaCIS.Core.Domain.Models
|
namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
///<summary>
|
///<summary>
|
||||||
///CommonDocument
|
///CommonDocument
|
||||||
///</summary>
|
///</summary>
|
||||||
[Table("CommonDocument")]
|
[Table("CommonDocument")]
|
||||||
public class CommonDocument : Entity, IAuditUpdate, IAuditAdd,ISoftDelete
|
public class CommonDocument : BaseFullAuditDeleteEntity
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public string Code { get; set; } = String.Empty;
|
||||||
|
|
||||||
|
|
||||||
[Required]
|
public string Name { get; set; } = String.Empty;
|
||||||
public string Code { get; set; } = String.Empty;
|
|
||||||
|
|
||||||
[Required]
|
public string NameCN { get; set; } = string.Empty;
|
||||||
public string Name { get; set; } = String.Empty;
|
|
||||||
|
|
||||||
public string NameCN { get; set; } = string.Empty;
|
public string Path { get; set; } = String.Empty;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Path
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
|
||||||
public string Path { get; set; } = String.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// CreateTime
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
|
||||||
public DateTime CreateTime { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// CreateUserId
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
|
||||||
public Guid CreateUserId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// UpdateTime
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
|
||||||
public DateTime UpdateTime { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// UpdateUserId
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
|
||||||
public Guid UpdateUserId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Description
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
|
||||||
public string Description { get; set; } = String.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// IsDeleted
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
|
||||||
public bool IsDeleted { get; set; }
|
|
||||||
|
|
||||||
public DateTime? DeletedTime { get; set; }
|
|
||||||
|
|
||||||
public Guid? DeleteUserId { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
public CriterionType? CriterionTypeEnum { get; set; }
|
public string Description { get; set; } = String.Empty;
|
||||||
public CommonDocumentFileType FileTypeEnum { get; set; }
|
|
||||||
public EmailBusinessScenario BusinessScenarioEnum { get; set; }
|
public CriterionType? CriterionTypeEnum { get; set; }
|
||||||
|
public CommonDocumentFileType FileTypeEnum { get; set; }
|
||||||
|
public EmailBusinessScenario BusinessScenarioEnum { get; set; }
|
||||||
|
|
||||||
|
|
||||||
//[Required]
|
}
|
||||||
//public Guid FileTypeId { get; set; }
|
|
||||||
//public Guid ModuleTypeId { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
//public Dictionary FileType { get; set; }
|
|
||||||
//public Dictionary ModuleType { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue