chore:目录重构

This commit is contained in:
陈淳
2023-04-15 17:35:22 +08:00
parent a612af4f68
commit fb27fb8aa4
238 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Infrastructure.Data.Auditing
{
public class AuditedObject : IAuditedObject
{
public DateTime CreationTime { get; set; } = DateTime.Now;
public long? CreatorId { get; set; }
public long? LastModifierId { get; set; }
public DateTime? LastModificationTime { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Infrastructure.Data.Auditing
{
public interface IAuditedObject : ICreationAuditedObject, IModificationAuditedObject
{
}
public interface IAuditedObject<TUser> : IAuditedObject, ICreationAuditedObject<TUser>, IModificationAuditedObject<TUser>
{
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Infrastructure.Data.Auditing
{
public interface ICreationAuditedObject : IHasCreationTime, IMayHaveCreator
{
}
public interface ICreationAuditedObject<TCreator> : ICreationAuditedObject, IMayHaveCreator<TCreator>
{
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Infrastructure.Data.Auditing
{
public interface IDeletionAuditedObject : IHasDeletionTime
{
long? DeleterId { get; }
}
public interface IDeletionAuditedObject<TUser> : IDeletionAuditedObject
{
TUser Deleter { get; }
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Infrastructure.Data.Auditing
{
public interface IFullAuditedObject : IAuditedObject, IDeletionAuditedObject
{
}
public interface IFullAuditedObject<TUser> : IAuditedObject<TUser>, IFullAuditedObject, IDeletionAuditedObject<TUser>
{
}
}

View File

@@ -0,0 +1,10 @@
using System;
namespace Yi.Framework.Infrastructure.Data.Auditing;
public interface IHasCreationTime
{
DateTime CreationTime { get; set; }
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Infrastructure.Data.Entities;
namespace Yi.Framework.Infrastructure.Data.Auditing
{
public interface IHasDeletionTime : ISoftDelete
{
DateTime? DeletionTime { get; }
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Infrastructure.Data.Auditing
{
public interface IHasEntityVersion
{
int EntityVersion { get; }
}
}

View File

@@ -0,0 +1,8 @@
namespace Yi.Framework.Infrastructure.Data.Auditing;
public interface IHasModificationTime
{
DateTime? LastModificationTime { get; }
}

View File

@@ -0,0 +1,13 @@
using System;
namespace Yi.Framework.Infrastructure.Data.Auditing;
public interface IMayHaveCreator<TCreator>
{
TCreator Creator { get; }
}
public interface IMayHaveCreator
{
long? CreatorId { get; }
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.Infrastructure.Data.Auditing
{
public interface IModificationAuditedObject : IHasModificationTime
{
long? LastModifierId { get; }
}
public interface IModificationAuditedObject<TUser> : IModificationAuditedObject
{
TUser LastModifier { get; }
}
}

View File

@@ -0,0 +1,13 @@
using System;
namespace Yi.Framework.Infrastructure.Data.Auditing;
public interface IMustHaveCreator<TCreator> : IMustHaveCreator
{
TCreator Creator { get; }
}
public interface IMustHaveCreator
{
long CreatorId { get; }
}