添加项目文件。
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
public abstract class Entity : IEntity<Guid>
|
||||
{
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public Guid Id { get ; set ; }
|
||||
}
|
||||
|
||||
public interface IEntity<TKey>
|
||||
{
|
||||
/// <summary>
|
||||
/// 编号
|
||||
/// </summary>
|
||||
|
||||
|
||||
|
||||
abstract TKey Id { get; set; }
|
||||
}
|
||||
|
||||
|
||||
//public class Entity<TKey> : IEntity
|
||||
//{
|
||||
|
||||
//}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
public interface IAuditAdd<TKey> where TKey: struct
|
||||
{
|
||||
TKey CreateUserId { get; set; }
|
||||
|
||||
DateTime CreateTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public interface IAuditAdd: IAuditAdd<Guid>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public interface IAuditAddWithUserName : IAuditAdd<Guid>
|
||||
{
|
||||
string CreateUser { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
public interface IAuditUpdate<TKey> where TKey : struct
|
||||
{
|
||||
TKey UpdateUserId { get; set; }
|
||||
//string UpdateUserName { get; set; }
|
||||
DateTime UpdateTime { get; set; }
|
||||
}
|
||||
|
||||
public interface IAuditUpdate : IAuditUpdate<Guid>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
|
||||
|
||||
public interface ISoftDelete
|
||||
{
|
||||
bool IsDeleted { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user