mirror of https://github.com/abpframework/abp.git
16 changed files with 428 additions and 7 deletions
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
|
|||
namespace Volo.Abp.Domain.Entities.Auditing |
|||
{ |
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="IAudited"/> for aggregate roots.
|
|||
/// </summary>
|
|||
[Serializable] |
|||
public abstract class AuditedAggregateRoot : CreationAuditedAggregateRoot, IAudited |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual DateTime? LastModificationTime { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual long? LastModifierUserId { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="IAudited"/> for aggregate roots.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of the primary key of the entity</typeparam>
|
|||
[Serializable] |
|||
public abstract class AuditedAggregateRoot<TPrimaryKey> : CreationAuditedAggregateRoot<TPrimaryKey>, IAudited |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual DateTime? LastModificationTime { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual long? LastModifierUserId { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
|
|||
namespace Volo.Abp.Domain.Entities.Auditing |
|||
{ |
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="IAudited{TUser}"/> for aggregate roots.
|
|||
/// </summary>
|
|||
/// <typeparam name="TUser">Type of the user</typeparam>
|
|||
[Serializable] |
|||
public abstract class AuditedAggregateRootWithUser<TUser> : AuditedAggregateRoot, IAudited<TUser> |
|||
where TUser : IEntity<long> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual TUser CreatorUser { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual TUser LastModifierUser { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="IAudited{TUser}"/> for aggregate roots.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of the primary key of the entity</typeparam>
|
|||
/// <typeparam name="TUser">Type of the user</typeparam>
|
|||
[Serializable] |
|||
public abstract class AuditedAggregateRootWithUser<TPrimaryKey, TUser> : AuditedAggregateRoot<TPrimaryKey>, IAudited<TUser> |
|||
where TUser : IEntity<long> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual TUser CreatorUser { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual TUser LastModifierUser { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
|
|||
namespace Volo.Abp.Domain.Entities.Auditing |
|||
{ |
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="IAudited"/>.
|
|||
/// </summary>
|
|||
[Serializable] |
|||
public abstract class AuditedEntity : CreationAuditedEntity, IAudited |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual DateTime? LastModificationTime { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual long? LastModifierUserId { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="IAudited"/>.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of the primary key of the entity</typeparam>
|
|||
[Serializable] |
|||
public abstract class AuditedEntity<TPrimaryKey> : CreationAuditedEntity<TPrimaryKey>, IAudited |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual DateTime? LastModificationTime { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual long? LastModifierUserId { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,36 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
|
|||
namespace Volo.Abp.Domain.Entities.Auditing |
|||
{ |
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="IAudited{TUser}"/>.
|
|||
/// </summary>
|
|||
/// <typeparam name="TUser">Type of the user</typeparam>
|
|||
[Serializable] |
|||
public abstract class AuditedEntityWithUser<TUser> : AuditedEntity, IAudited<TUser> |
|||
where TUser : IEntity<long> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual TUser CreatorUser { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual TUser LastModifierUser { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="IAudited{TUser}"/>.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of the primary key of the entity</typeparam>
|
|||
/// <typeparam name="TUser">Type of the user</typeparam>
|
|||
[Serializable] |
|||
public abstract class AuditedEntityWithUser<TPrimaryKey, TUser> : AuditedEntity<TPrimaryKey>, IAudited<TUser> |
|||
where TUser : IEntity<long> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual TUser CreatorUser { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual TUser LastModifierUser { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
|
|||
namespace Volo.Abp.Domain.Entities.Auditing |
|||
{ |
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="ICreationAudited"/> for aggregate roots.
|
|||
/// </summary>
|
|||
[Serializable] |
|||
public abstract class CreationAuditedAggregateRoot : AggregateRoot, ICreationAudited |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual DateTime CreationTime { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual long? CreatorUserId { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="ICreationAudited"/> for aggregate roots.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of the primary key of the entity</typeparam>
|
|||
[Serializable] |
|||
public abstract class CreationAuditedAggregateRoot<TPrimaryKey> : AggregateRoot<TPrimaryKey>, ICreationAudited |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual DateTime CreationTime { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual long? CreatorUserId { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,28 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
|
|||
namespace Volo.Abp.Domain.Entities.Auditing |
|||
{ |
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="ICreationAudited{TUser}"/> for aggregate roots.
|
|||
/// </summary>
|
|||
/// <typeparam name="TUser">Type of the user</typeparam>
|
|||
[Serializable] |
|||
public abstract class CreationAuditedAggregateRootWithUser<TUser> : CreationAuditedAggregateRoot, ICreationAudited<TUser> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual TUser CreatorUser { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="ICreationAudited{TUser}"/> for aggregate roots.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of the primary key of the entity</typeparam>
|
|||
/// <typeparam name="TUser">Type of the user</typeparam>
|
|||
[Serializable] |
|||
public abstract class CreationAuditedAggregateRootWithUser<TPrimaryKey, TUser> : CreationAuditedAggregateRoot<TPrimaryKey>, ICreationAudited<TUser> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual TUser CreatorUser { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
|
|||
namespace Volo.Abp.Domain.Entities.Auditing |
|||
{ |
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="T:Volo.Abp.Auditing.ICreationAudited" /> for an entity.
|
|||
/// </summary>
|
|||
[Serializable] |
|||
public abstract class CreationAuditedEntity : Entity, ICreationAudited |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual DateTime CreationTime { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual long? CreatorUserId { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="ICreationAudited"/> for an entity.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of the primary key of the entity</typeparam>
|
|||
[Serializable] |
|||
public abstract class CreationAuditedEntity<TPrimaryKey> : Entity<TPrimaryKey>, ICreationAudited |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual DateTime CreationTime { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual long? CreatorUserId { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,28 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
|
|||
namespace Volo.Abp.Domain.Entities.Auditing |
|||
{ |
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="ICreationAudited{TUser}"/>.
|
|||
/// </summary>
|
|||
/// <typeparam name="TUser">Type of the user</typeparam>
|
|||
[Serializable] |
|||
public abstract class CreationAuditedEntityWithUser<TUser> : CreationAuditedEntity, ICreationAudited<TUser> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual TUser CreatorUser { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// This class can be used to simplify implementing <see cref="ICreationAudited{TUser}"/>.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of the primary key of the entity</typeparam>
|
|||
/// <typeparam name="TUser">Type of the user</typeparam>
|
|||
[Serializable] |
|||
public abstract class CreationAuditedEntityWithUser<TPrimaryKey, TUser> : CreationAuditedEntity<TPrimaryKey>, ICreationAudited<TUser> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual TUser CreatorUser { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
|
|||
namespace Volo.Abp.Domain.Entities.Auditing |
|||
{ |
|||
/// <summary>
|
|||
/// Implements <see cref="IFullAudited"/> to be a base class for full-audited aggregate roots.
|
|||
/// </summary>
|
|||
[Serializable] |
|||
public abstract class FullAuditedAggregateRoot : AuditedAggregateRoot, IFullAudited |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual bool IsDeleted { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual long? DeleterUserId { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual DateTime? DeletionTime { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Implements <see cref="IFullAudited"/> to be a base class for full-audited aggregate roots.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of the primary key of the entity</typeparam>
|
|||
[Serializable] |
|||
public abstract class FullAuditedAggregateRoot<TPrimaryKey> : AuditedAggregateRoot<TPrimaryKey>, IFullAudited |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual bool IsDeleted { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual long? DeleterUserId { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual DateTime? DeletionTime { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
|
|||
namespace Volo.Abp.Domain.Entities.Auditing |
|||
{ |
|||
/// <summary>
|
|||
/// Implements <see cref="IFullAudited{TUser}"/> to be a base class for full-audited aggregate roots.
|
|||
/// </summary>
|
|||
/// <typeparam name="TUser">Type of the user</typeparam>
|
|||
[Serializable] |
|||
public abstract class FullAuditedAggregateRootWithUser<TUser> : FullAuditedAggregateRoot, IFullAudited<TUser> |
|||
where TUser : IEntity<long> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual TUser DeleterUser { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public TUser CreatorUser { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public TUser LastModifierUser { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Implements <see cref="IFullAudited{TUser}"/> to be a base class for full-audited aggregate roots.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of the primary key of the entity</typeparam>
|
|||
/// <typeparam name="TUser">Type of the user</typeparam>
|
|||
[Serializable] |
|||
public abstract class FullAuditedAggregateRootWithUser<TPrimaryKey, TUser> : FullAuditedAggregateRoot<TPrimaryKey>, IFullAudited<TUser> |
|||
where TUser : IEntity<long> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual TUser DeleterUser { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public TUser CreatorUser { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public TUser LastModifierUser { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
|
|||
namespace Volo.Abp.Domain.Entities.Auditing |
|||
{ |
|||
/// <summary>
|
|||
/// Implements <see cref="IFullAudited"/> to be a base class for full-audited entities.
|
|||
/// </summary>
|
|||
[Serializable] |
|||
public abstract class FullAuditedEntity : AuditedEntity, IFullAudited |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual bool IsDeleted { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual long? DeleterUserId { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual DateTime? DeletionTime { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Implements <see cref="IFullAudited"/> to be a base class for full-audited entities.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of the primary key of the entity</typeparam>
|
|||
[Serializable] |
|||
public abstract class FullAuditedEntity<TPrimaryKey> : AuditedEntity<TPrimaryKey>, IFullAudited |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual bool IsDeleted { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual long? DeleterUserId { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public virtual DateTime? DeletionTime { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,42 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
|
|||
namespace Volo.Abp.Domain.Entities.Auditing |
|||
{ |
|||
/// <summary>
|
|||
/// Implements <see cref="IFullAudited{TUser}"/> to be a base class for full-audited entities.
|
|||
/// </summary>
|
|||
/// <typeparam name="TUser">Type of the user</typeparam>
|
|||
[Serializable] |
|||
public abstract class FullAuditedEntityWithUser<TUser> : FullAuditedEntity, IFullAudited<TUser> |
|||
where TUser : IEntity<long> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual TUser DeleterUser { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public TUser CreatorUser { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public TUser LastModifierUser { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Implements <see cref="IFullAudited{TUser}"/> to be a base class for full-audited entities.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of the primary key of the entity</typeparam>
|
|||
/// <typeparam name="TUser">Type of the user</typeparam>
|
|||
[Serializable] |
|||
public abstract class FullAuditedEntityWithUser<TPrimaryKey, TUser> : FullAuditedEntity<TPrimaryKey>, IFullAudited<TUser> |
|||
where TUser : IEntity<long> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public virtual TUser DeleterUser { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public TUser CreatorUser { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public TUser LastModifierUser { get; set; } |
|||
} |
|||
} |
|||
Loading…
Reference in new issue