mirror of https://github.com/abpframework/abp.git
9 changed files with 238 additions and 3 deletions
@ -0,0 +1,35 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
using Volo.Abp.Data; |
|||
|
|||
namespace Volo.Abp.Application.Dtos |
|||
{ |
|||
/// <summary>
|
|||
/// This class can be inherited by DTO classes to implement <see cref="IAuditedObject"/> interface.
|
|||
/// It also implements the <see cref="IHasExtraProperties"/> interface.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of primary key</typeparam>
|
|||
[Serializable] |
|||
public abstract class ExtensibleAuditedEntityDto<TPrimaryKey> : ExtensibleCreationAuditedEntityDto<TPrimaryKey>, IAuditedObject |
|||
{ |
|||
/// <inheritdoc />
|
|||
public DateTime? LastModificationTime { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public Guid? LastModifierId { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// This class can be inherited by DTO classes to implement <see cref="IAuditedObject"/> interface.
|
|||
/// It also implements the <see cref="IHasExtraProperties"/> interface.
|
|||
/// </summary>
|
|||
[Serializable] |
|||
public abstract class ExtensibleAuditedEntityDto : ExtensibleCreationAuditedEntityDto, IAuditedObject |
|||
{ |
|||
/// <inheritdoc />
|
|||
public DateTime? LastModificationTime { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public Guid? LastModifierId { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,40 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
using Volo.Abp.Data; |
|||
|
|||
namespace Volo.Abp.Application.Dtos |
|||
{ |
|||
/// <summary>
|
|||
/// This class can be inherited by DTO classes to implement <see cref="IAuditedObject"/> interface.
|
|||
/// It has the <see cref="Creator"/> and <see cref="LastModifier"/> objects as a DTOs represent the related user.
|
|||
/// It also implements the <see cref="IHasExtraProperties"/> interface.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of primary key</typeparam>
|
|||
/// <typeparam name="TUserDto">Type of the User DTO</typeparam>
|
|||
[Serializable] |
|||
public abstract class ExtensibleAuditedEntityWithUserDto<TPrimaryKey, TUserDto> : ExtensibleAuditedEntityDto<TPrimaryKey>, IAuditedObject<TUserDto> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public TUserDto Creator { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public TUserDto LastModifier { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// This class can be inherited by DTO classes to implement <see cref="IAuditedObject"/> interface.
|
|||
/// It has the <see cref="Creator"/> and <see cref="LastModifier"/> objects as a DTOs represent the related user.
|
|||
/// It also implements the <see cref="IHasExtraProperties"/> interface.
|
|||
/// </summary>
|
|||
/// <typeparam name="TUserDto">Type of the User DTO</typeparam>
|
|||
[Serializable] |
|||
public abstract class ExtensibleAuditedEntityWithUserDto<TUserDto> : ExtensibleAuditedEntityDto, |
|||
IAuditedObject<TUserDto> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public TUserDto Creator { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public TUserDto LastModifier { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,35 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
using Volo.Abp.Data; |
|||
|
|||
namespace Volo.Abp.Application.Dtos |
|||
{ |
|||
/// <summary>
|
|||
/// This class can be inherited by DTO classes to implement <see cref="ICreationAuditedObject"/> interface.
|
|||
/// It also implements the <see cref="IHasExtraProperties"/> interface.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of primary key</typeparam>
|
|||
[Serializable] |
|||
public abstract class ExtensibleCreationAuditedEntityDto<TPrimaryKey> : ExtensibleEntityDto<TPrimaryKey>, ICreationAuditedObject |
|||
{ |
|||
/// <inheritdoc />
|
|||
public DateTime CreationTime { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public Guid? CreatorId { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// This class can be inherited by DTO classes to implement <see cref="ICreationAuditedObject"/> interface.
|
|||
/// It also implements the <see cref="IHasExtraProperties"/> interface.
|
|||
/// </summary>
|
|||
[Serializable] |
|||
public abstract class ExtensibleCreationAuditedEntityDto : ExtensibleEntityDto, ICreationAuditedObject |
|||
{ |
|||
/// <inheritdoc />
|
|||
public DateTime CreationTime { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public Guid? CreatorId { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
using Volo.Abp.Data; |
|||
|
|||
namespace Volo.Abp.Application.Dtos |
|||
{ |
|||
/// <summary>
|
|||
/// This class can be inherited by DTO classes to implement <see cref="ICreationAuditedObject{TCreator}"/> interface.
|
|||
/// It has the <see cref="Creator"/> object as a DTO represents the user.
|
|||
/// It also implements the <see cref="IHasExtraProperties"/> interface.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of primary key</typeparam>
|
|||
/// <typeparam name="TUserDto">Type of the User DTO</typeparam>
|
|||
[Serializable] |
|||
public abstract class ExtensibleCreationAuditedEntityWithUserDto<TPrimaryKey, TUserDto> : ExtensibleCreationAuditedEntityDto<TPrimaryKey>, ICreationAuditedObject<TUserDto> |
|||
{ |
|||
public TUserDto Creator { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// This class can be inherited by DTO classes to implement <see cref="ICreationAuditedObject{TCreator}"/> interface.
|
|||
/// It has the <see cref="Creator"/> object as a DTO represents the user.
|
|||
/// It also implements the <see cref="IHasExtraProperties"/> interface.
|
|||
/// </summary>
|
|||
/// <typeparam name="TUserDto">Type of the User DTO</typeparam>
|
|||
[Serializable] |
|||
public abstract class ExtensibleCreationAuditedEntityWithUserDto<TUserDto> : ExtensibleCreationAuditedEntityDto, |
|||
ICreationAuditedObject<TUserDto> |
|||
{ |
|||
public TUserDto Creator { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
using Volo.Abp.Data; |
|||
|
|||
namespace Volo.Abp.Application.Dtos |
|||
{ |
|||
/// <summary>
|
|||
/// This class can be inherited by DTO classes to implement <see cref="IFullAuditedObject"/> interface.
|
|||
/// It also implements the <see cref="IHasExtraProperties"/> interface.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of primary key</typeparam>
|
|||
[Serializable] |
|||
public abstract class ExtensibleFullAuditedEntityDto<TPrimaryKey> : ExtensibleAuditedEntityDto<TPrimaryKey>, IFullAuditedObject |
|||
{ |
|||
/// <inheritdoc />
|
|||
public bool IsDeleted { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public Guid? DeleterId { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public DateTime? DeletionTime { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// This class can be inherited by DTO classes to implement <see cref="IFullAuditedObject"/> interface.
|
|||
/// It also implements the <see cref="IHasExtraProperties"/> interface.
|
|||
/// </summary>
|
|||
[Serializable] |
|||
public abstract class ExtensibleFullAuditedEntityDto : ExtensibleAuditedEntityDto, IFullAuditedObject |
|||
{ |
|||
/// <inheritdoc />
|
|||
public bool IsDeleted { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public Guid? DeleterId { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public DateTime? DeletionTime { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,46 @@ |
|||
using System; |
|||
using Volo.Abp.Auditing; |
|||
using Volo.Abp.Data; |
|||
|
|||
namespace Volo.Abp.Application.Dtos |
|||
{ |
|||
/// <summary>
|
|||
/// This class can be inherited by DTO classes to implement <see cref="IFullAuditedObject{TUser}"/> interface.
|
|||
/// It has the <see cref="Creator"/>, <see cref="LastModifier"/> and <see cref="Deleter"/> objects as a DTOs represent the related user.
|
|||
/// It also implements the <see cref="IHasExtraProperties"/> interface.
|
|||
/// </summary>
|
|||
/// <typeparam name="TPrimaryKey">Type of primary key</typeparam>
|
|||
/// <typeparam name="TUserDto">Type of the User</typeparam>
|
|||
[Serializable] |
|||
public abstract class ExtensibleFullAuditedEntityWithUserDto<TPrimaryKey, TUserDto> : ExtensibleFullAuditedEntityDto<TPrimaryKey>, IFullAuditedObject<TUserDto> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public TUserDto Creator { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public TUserDto LastModifier { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public TUserDto Deleter { get; set; } |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// This class can be inherited by DTO classes to implement <see cref="IFullAuditedObject{TUser}"/> interface.
|
|||
/// It has the <see cref="Creator"/>, <see cref="LastModifier"/> and <see cref="Deleter"/> objects as a DTOs represent the related user.
|
|||
/// It also implements the <see cref="IHasExtraProperties"/> interface.
|
|||
/// </summary>
|
|||
/// <typeparam name="TUserDto">Type of the User</typeparam>
|
|||
[Serializable] |
|||
public abstract class ExtensibleFullAuditedEntityWithUserDto<TUserDto> : ExtensibleFullAuditedEntityDto, |
|||
IFullAuditedObject<TUserDto> |
|||
{ |
|||
/// <inheritdoc />
|
|||
public TUserDto Creator { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public TUserDto LastModifier { get; set; } |
|||
|
|||
/// <inheritdoc />
|
|||
public TUserDto Deleter { get; set; } |
|||
} |
|||
} |
|||
Loading…
Reference in new issue