Updated the `EnvelopeDto` class to use a simplified receiver model (`EnvelopeReceiverSimpleDto`) for streamlined data handling. Added the `EnvelopeReceiverSimpleDto` class to represent basic receiver information (`Name`, `Email`, `Signed`). Introduced the `EnvelopeStatus` enumeration in `EnvelopeStatus.cs` to define envelope lifecycle statuses, repurposed for the `ReceiverUI` context. Added `EnvelopeStatusExtensions` with `IsActive` and `IsCompleted` methods to evaluate envelope status states.
40 lines
939 B
C#
40 lines
939 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace EnvelopeGenerator.ReceiverUI.Models;
|
|
|
|
public class EnvelopeDto
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public int Id { get; set; }
|
|
|
|
[JsonPropertyName("uuid")]
|
|
public string? Uuid { get; set; }
|
|
|
|
[JsonPropertyName("title")]
|
|
public string? Title { get; set; }
|
|
|
|
[JsonPropertyName("status")]
|
|
public int Status { get; set; }
|
|
|
|
[JsonPropertyName("docResult")]
|
|
public byte[]? DocResult { get; set; }
|
|
|
|
[JsonPropertyName("envelopeReceivers")]
|
|
public List<EnvelopeReceiverSimpleDto> EnvelopeReceivers { get; set; } = new();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Simplified receiver model for envelope list display
|
|
/// </summary>
|
|
public class EnvelopeReceiverSimpleDto
|
|
{
|
|
[JsonPropertyName("name")]
|
|
public string? Name { get; set; }
|
|
|
|
[JsonPropertyName("email")]
|
|
public string? Email { get; set; }
|
|
|
|
[JsonPropertyName("signed")]
|
|
public bool Signed { get; set; }
|
|
}
|