Browse Source
Add `ctor` to `ExtensibleEntityDto` base classes.
pull/12421/head
maliming
4 years ago
No known key found for this signature in database
GPG Key ID: 96224957E51C89E
7 changed files with
174 additions and
0 deletions
-
framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Dtos/ExtensibleAuditedEntityDto.cs
-
framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Dtos/ExtensibleAuditedEntityWithUserDto.cs
-
framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Dtos/ExtensibleCreationAuditedEntityDto.cs
-
framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Dtos/ExtensibleCreationAuditedEntityWithUserDto.cs
-
framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Dtos/ExtensibleEntityDto.cs
-
framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Dtos/ExtensibleFullAuditedEntityDto.cs
-
framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Dtos/ExtensibleFullAuditedEntityWithUserDto.cs
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
using System; |
|
|
|
using Volo.Abp.Auditing; |
|
|
|
using Volo.Abp.Data; |
|
|
|
|
|
|
|
namespace Volo.Abp.Application.Dtos; |
|
|
|
|
|
|
|
@ -16,6 +17,18 @@ public abstract class ExtensibleAuditedEntityDto<TPrimaryKey> : ExtensibleCreati |
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public Guid? LastModifierId { get; set; } |
|
|
|
|
|
|
|
protected ExtensibleAuditedEntityDto() |
|
|
|
: this(true) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected ExtensibleAuditedEntityDto(bool setDefaultsForExtraProperties) |
|
|
|
: base(setDefaultsForExtraProperties) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -30,4 +43,16 @@ public abstract class ExtensibleAuditedEntityDto : ExtensibleCreationAuditedEnti |
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public Guid? LastModifierId { get; set; } |
|
|
|
|
|
|
|
protected ExtensibleAuditedEntityDto() |
|
|
|
: this(true) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected ExtensibleAuditedEntityDto(bool setDefaultsForExtraProperties) |
|
|
|
: base(setDefaultsForExtraProperties) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
using System; |
|
|
|
using Volo.Abp.Auditing; |
|
|
|
using Volo.Abp.Data; |
|
|
|
|
|
|
|
namespace Volo.Abp.Application.Dtos; |
|
|
|
|
|
|
|
@ -18,6 +19,18 @@ public abstract class ExtensibleAuditedEntityWithUserDto<TPrimaryKey, TUserDto> |
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public TUserDto LastModifier { get; set; } |
|
|
|
|
|
|
|
protected ExtensibleAuditedEntityWithUserDto() |
|
|
|
: this(true) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected ExtensibleAuditedEntityWithUserDto(bool setDefaultsForExtraProperties) |
|
|
|
: base(setDefaultsForExtraProperties) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -35,4 +48,16 @@ public abstract class ExtensibleAuditedEntityWithUserDto<TUserDto> : ExtensibleA |
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public TUserDto LastModifier { get; set; } |
|
|
|
|
|
|
|
protected ExtensibleAuditedEntityWithUserDto() |
|
|
|
: this(true) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected ExtensibleAuditedEntityWithUserDto(bool setDefaultsForExtraProperties) |
|
|
|
: base(setDefaultsForExtraProperties) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
using System; |
|
|
|
using Volo.Abp.Auditing; |
|
|
|
using Volo.Abp.Data; |
|
|
|
|
|
|
|
namespace Volo.Abp.Application.Dtos; |
|
|
|
|
|
|
|
@ -16,6 +17,18 @@ public abstract class ExtensibleCreationAuditedEntityDto<TPrimaryKey> : Extensib |
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public Guid? CreatorId { get; set; } |
|
|
|
|
|
|
|
protected ExtensibleCreationAuditedEntityDto() |
|
|
|
: this(true) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected ExtensibleCreationAuditedEntityDto(bool setDefaultsForExtraProperties) |
|
|
|
: base(setDefaultsForExtraProperties) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -30,4 +43,16 @@ public abstract class ExtensibleCreationAuditedEntityDto : ExtensibleEntityDto, |
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public Guid? CreatorId { get; set; } |
|
|
|
|
|
|
|
protected ExtensibleCreationAuditedEntityDto() |
|
|
|
: this(true) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected ExtensibleCreationAuditedEntityDto(bool setDefaultsForExtraProperties) |
|
|
|
: base(setDefaultsForExtraProperties) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
using System; |
|
|
|
using Volo.Abp.Auditing; |
|
|
|
using Volo.Abp.Data; |
|
|
|
|
|
|
|
namespace Volo.Abp.Application.Dtos; |
|
|
|
|
|
|
|
@ -14,6 +15,18 @@ namespace Volo.Abp.Application.Dtos; |
|
|
|
public abstract class ExtensibleCreationAuditedEntityWithUserDto<TPrimaryKey, TUserDto> : ExtensibleCreationAuditedEntityDto<TPrimaryKey>, ICreationAuditedObject<TUserDto> |
|
|
|
{ |
|
|
|
public TUserDto Creator { get; set; } |
|
|
|
|
|
|
|
protected ExtensibleCreationAuditedEntityWithUserDto() |
|
|
|
: this(true) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected ExtensibleCreationAuditedEntityWithUserDto(bool setDefaultsForExtraProperties) |
|
|
|
: base(setDefaultsForExtraProperties) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -27,4 +40,16 @@ public abstract class ExtensibleCreationAuditedEntityWithUserDto<TUserDto> : Ext |
|
|
|
ICreationAuditedObject<TUserDto> |
|
|
|
{ |
|
|
|
public TUserDto Creator { get; set; } |
|
|
|
|
|
|
|
protected ExtensibleCreationAuditedEntityWithUserDto() |
|
|
|
: this(true) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected ExtensibleCreationAuditedEntityWithUserDto(bool setDefaultsForExtraProperties) |
|
|
|
: base(setDefaultsForExtraProperties) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -11,6 +11,18 @@ public abstract class ExtensibleEntityDto<TKey> : ExtensibleObject, IEntityDto<T |
|
|
|
/// </summary>
|
|
|
|
public TKey Id { get; set; } |
|
|
|
|
|
|
|
protected ExtensibleEntityDto() |
|
|
|
: this(true) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected ExtensibleEntityDto(bool setDefaultsForExtraProperties) |
|
|
|
: base(setDefaultsForExtraProperties) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public override string ToString() |
|
|
|
{ |
|
|
|
return $"[DTO: {GetType().Name}] Id = {Id}"; |
|
|
|
@ -20,6 +32,18 @@ public abstract class ExtensibleEntityDto<TKey> : ExtensibleObject, IEntityDto<T |
|
|
|
[Serializable] |
|
|
|
public abstract class ExtensibleEntityDto : ExtensibleObject, IEntityDto |
|
|
|
{ |
|
|
|
protected ExtensibleEntityDto() |
|
|
|
: this(true) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected ExtensibleEntityDto(bool setDefaultsForExtraProperties) |
|
|
|
: base(setDefaultsForExtraProperties) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public override string ToString() |
|
|
|
{ |
|
|
|
return $"[DTO: {GetType().Name}]"; |
|
|
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
using System; |
|
|
|
using Volo.Abp.Auditing; |
|
|
|
using Volo.Abp.Data; |
|
|
|
|
|
|
|
namespace Volo.Abp.Application.Dtos; |
|
|
|
|
|
|
|
@ -19,6 +20,18 @@ public abstract class ExtensibleFullAuditedEntityDto<TPrimaryKey> : ExtensibleAu |
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public DateTime? DeletionTime { get; set; } |
|
|
|
|
|
|
|
protected ExtensibleFullAuditedEntityDto() |
|
|
|
: this(true) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected ExtensibleFullAuditedEntityDto(bool setDefaultsForExtraProperties) |
|
|
|
: base(setDefaultsForExtraProperties) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -36,4 +49,16 @@ public abstract class ExtensibleFullAuditedEntityDto : ExtensibleAuditedEntityDt |
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public DateTime? DeletionTime { get; set; } |
|
|
|
|
|
|
|
protected ExtensibleFullAuditedEntityDto() |
|
|
|
: this(true) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected ExtensibleFullAuditedEntityDto(bool setDefaultsForExtraProperties) |
|
|
|
: base(setDefaultsForExtraProperties) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
using System; |
|
|
|
using Volo.Abp.Auditing; |
|
|
|
using Volo.Abp.Data; |
|
|
|
|
|
|
|
namespace Volo.Abp.Application.Dtos; |
|
|
|
|
|
|
|
@ -21,6 +22,18 @@ public abstract class ExtensibleFullAuditedEntityWithUserDto<TPrimaryKey, TUserD |
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public TUserDto Deleter { get; set; } |
|
|
|
|
|
|
|
protected ExtensibleFullAuditedEntityWithUserDto() |
|
|
|
: this(true) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected ExtensibleFullAuditedEntityWithUserDto(bool setDefaultsForExtraProperties) |
|
|
|
: base(setDefaultsForExtraProperties) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -41,4 +54,16 @@ public abstract class ExtensibleFullAuditedEntityWithUserDto<TUserDto> : Extensi |
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public TUserDto Deleter { get; set; } |
|
|
|
|
|
|
|
protected ExtensibleFullAuditedEntityWithUserDto() |
|
|
|
: this(true) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
protected ExtensibleFullAuditedEntityWithUserDto(bool setDefaultsForExtraProperties) |
|
|
|
: base(setDefaultsForExtraProperties) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|