-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: return full deletion process on start
- Loading branch information
Showing
1 changed file
with
3 additions
and
18 deletions.
There are no files selected for viewing
21 changes: 3 additions & 18 deletions
21
...on/Identities/Commands/StartDeletionProcessAsOwner/StartDeletionProcessAsOwnerResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,11 @@ | ||
using Backbone.DevelopmentKit.Identity.ValueObjects; | ||
using Backbone.Modules.Devices.Application.DTOs; | ||
using Backbone.Modules.Devices.Domain.Entities.Identities; | ||
|
||
namespace Backbone.Modules.Devices.Application.Identities.Commands.StartDeletionProcessAsOwner; | ||
|
||
public class StartDeletionProcessAsOwnerResponse | ||
public class StartDeletionProcessAsOwnerResponse : IdentityDeletionProcessOverviewDTO | ||
{ | ||
public StartDeletionProcessAsOwnerResponse(IdentityDeletionProcess deletionProcess) | ||
public StartDeletionProcessAsOwnerResponse(IdentityDeletionProcess deletionProcess) : base(deletionProcess) | ||
{ | ||
Id = deletionProcess.Id; | ||
Status = deletionProcess.Status; | ||
CreatedAt = deletionProcess.CreatedAt; | ||
ApprovedAt = deletionProcess.ApprovedAt ?? throw new Exception($"The '{nameof(IdentityDeletionProcess.ApprovedAt)}' property of the given deletion process must not be null."); | ||
ApprovedByDevice = deletionProcess.ApprovedByDevice ?? throw new Exception($"The '{nameof(IdentityDeletionProcess.ApprovedByDevice)}' property of the given deletion process must not be null."); | ||
GracePeriodEndsAt = deletionProcess.GracePeriodEndsAt.GetValueOrDefault(); | ||
} | ||
|
||
public string Id { get; set; } | ||
public DeletionProcessStatus Status { get; set; } | ||
public DateTime CreatedAt { get; set; } | ||
|
||
public DateTime ApprovedAt { get; set; } | ||
public DeviceId ApprovedByDevice { get; set; } | ||
|
||
public DateTime GracePeriodEndsAt { get; set; } | ||
} |