26 lines
646 B
C#
26 lines
646 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using EnvelopeGenerator.Domain.Constants;
|
|
using MediatR;
|
|
|
|
namespace EnvelopeGenerator.Application.Envelopes.Commands;
|
|
|
|
public record DeleteEnvelopeResultDto(int EnvelopeId, EnvelopeStatus AppliedStatus, bool IsNoOp);
|
|
|
|
public record DeleteEnvelopeCommand : IRequest<DeleteEnvelopeResultDto>
|
|
{
|
|
[Required]
|
|
public int EnvelopeId { get; init; }
|
|
|
|
[Required]
|
|
[MinLength(1)]
|
|
public string Reason { get; init; } = string.Empty;
|
|
|
|
internal int UserId { get; private set; }
|
|
|
|
public DeleteEnvelopeCommand WithAuth(int userId)
|
|
{
|
|
UserId = userId;
|
|
return this;
|
|
}
|
|
}
|