40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using EnvelopeGenerator.Domain.Constants;
|
|
using MediatR;
|
|
|
|
namespace EnvelopeGenerator.Application.Envelopes.Commands;
|
|
|
|
public record SaveEnvelopeDraftResultDto(int EnvelopeId, EnvelopeStatus Status);
|
|
|
|
public record SaveEnvelopeDraftCommand : IRequest<SaveEnvelopeDraftResultDto>
|
|
{
|
|
public int? EnvelopeId { get; init; }
|
|
|
|
public string? Title { get; init; }
|
|
|
|
public string? Message { get; init; }
|
|
|
|
public bool TFAEnabled { get; init; }
|
|
|
|
public SaveEnvelopeDraftDocumentDto? Document { get; init; }
|
|
|
|
public List<SaveEnvelopeDraftReceiverDto> Receivers { get; init; } = new();
|
|
|
|
internal int UserId { get; private set; }
|
|
|
|
public SaveEnvelopeDraftCommand WithAuth(int userId)
|
|
{
|
|
UserId = userId;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
public record SaveEnvelopeDraftDocumentDto(string DataAsBase64);
|
|
|
|
public record SaveEnvelopeDraftFieldDto(double X, double Y, int Page);
|
|
|
|
public record SaveEnvelopeDraftReceiverDto(
|
|
string EmailAddress,
|
|
string? Name,
|
|
string? PhoneNumber,
|
|
List<SaveEnvelopeDraftFieldDto> Fields);
|