Introduce the `DeleteProfileProcedure` record in the new `ReC.Application.Common.Procedures.DeleteProcedure` namespace. This record implements the `IDeleteProcedure` interface and provides properties for specifying a range of GUID/IDs (`Start`, `End`) and a `Force` flag to allow deletion even with dependent ACTION data. Added a `ToObjectProcedure` method to convert `DeleteProfileProcedure` instances into `DeleteObjectProcedure` objects, setting the `Entity` to `"PROFILE"`.
31 lines
739 B
C#
31 lines
739 B
C#
namespace ReC.Application.Common.Procedures.DeleteProcedure;
|
|
|
|
public record DeleteProfileProcedure : IDeleteProcedure
|
|
{
|
|
/// <summary>
|
|
/// Start GUID/ID (inclusive)
|
|
/// </summary>
|
|
public long Start { get; set; }
|
|
|
|
/// <summary>
|
|
/// End GUID/ID (inclusive). If 0, will be set to Start value.
|
|
/// </summary>
|
|
public long End { get; set; }
|
|
|
|
/// <summary>
|
|
/// If true, delete even if dependent ACTION data exists
|
|
/// </summary>
|
|
public bool Force { get; set; }
|
|
|
|
public DeleteObjectProcedure ToObjectProcedure()
|
|
{
|
|
return new DeleteObjectProcedure
|
|
{
|
|
Entity = "PROFILE",
|
|
Start = Start,
|
|
End = End,
|
|
Force = Force
|
|
};
|
|
}
|
|
}
|