ICreationAudited.cs 955 B

123456789101112131415161718192021222324252627
  1. namespace Abp.Domain.Entities.Auditing
  2. {
  3. /// <summary>
  4. /// This interface is implemented by entities that is wanted to store creation information (who and when created).
  5. /// Creation time and creator user are automatically set when saving <see cref="Entity"/> to database.
  6. /// </summary>
  7. public interface ICreationAudited : IHasCreationTime
  8. {
  9. /// <summary>
  10. /// Id of the creator user of this entity.
  11. /// </summary>
  12. long? CreatorUserId { get; set; }
  13. }
  14. /// <summary>
  15. /// Adds navigation properties to <see cref="ICreationAudited"/> interface for user.
  16. /// </summary>
  17. /// <typeparam name="TUser">Type of the user</typeparam>
  18. public interface ICreationAudited<TUser> : ICreationAudited
  19. where TUser : IEntity<long>
  20. {
  21. /// <summary>
  22. /// Reference to the creator user of this entity.
  23. /// </summary>
  24. TUser CreatorUser { get; set; }
  25. }
  26. }