| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using System;
- using Abp.Domain.Entities.Auditing;
- using Abp.Timing;
- namespace Abp.Application.Services.Dto
- {
- /// <summary>
- /// A shortcut of <see cref="CreationAuditedEntityDto"/> for most used primary key type (<see cref="int"/>).
- /// </summary>
- [Serializable]
- public abstract class CreationAuditedEntityDto : CreationAuditedEntityDto<int>
- {
-
- }
- /// <summary>
- /// This class can be inherited for simple Dto objects those are used for entities implement <see cref="ICreationAudited"/> interface.
- /// </summary>
- /// <typeparam name="TPrimaryKey">Type of primary key</typeparam>
- [Serializable]
- public abstract class CreationAuditedEntityDto<TPrimaryKey> : EntityDto<TPrimaryKey>, ICreationAudited
- {
- /// <summary>
- /// Creation date of this entity.
- /// </summary>
- public DateTime CreationTime { get; set; }
- /// <summary>
- /// Creator user's id for this entity.
- /// </summary>
- public long? CreatorUserId { get; set; }
- /// <summary>
- /// Constructor.
- /// </summary>
- protected CreationAuditedEntityDto()
- {
- CreationTime = Clock.Now;
- }
- }
- }
|