Replaced the `EnvelopeType` class with `EnvelopeTypeDefaults` across the codebase to standardize the data model. Updated DTOs, repositories, services, mappings, and database contexts to reflect this change. Key updates include: - Updated `EnvelopeDto` to use `EnvelopeTypeDefaults`. - Modified `IEnvelopeTypeRepository` and `IEnvelopeTypeService` interfaces. - Adjusted mappings in `MappingProfile.cs` for `EnvelopeTypeDefaults`. - Updated `ReadEnvelopeTypesQueryHandler` and `CreateEnvelopeCommandHandler` to use `EnvelopeTypeDefaults`. - Replaced `EnvelopeType` with `EnvelopeTypeDefaults` in `EnvelopeTypeModel.vb`, `frmEnvelopeMainData.vb`, and `EGDbContextBase`. - Introduced the `EnvelopeTypeDefaults` class with updated schema mappings. - Updated `EnvelopeTypeRepository` and `TestEnvelopeTypeController` to use `EnvelopeTypeDefaults`. These changes ensure consistency and improve maintainability across the application.
174 lines
3.9 KiB
C#
174 lines
3.9 KiB
C#
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
|
|
using DigitalData.UserManager.Application.DTOs.User;
|
|
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
|
|
using EnvelopeGenerator.Application.Common.Dto.History;
|
|
using EnvelopeGenerator.Domain.Constants;
|
|
using EnvelopeGenerator.Domain.Entities;
|
|
using EnvelopeGenerator.Domain.Interfaces;
|
|
namespace EnvelopeGenerator.Application.Common.Dto;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public record EnvelopeDto : IEnvelope
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public int UserId { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public required EnvelopeStatus Status { get; set; }
|
|
|
|
/// <summary>
|
|
/// Default value is string.Empty
|
|
/// </summary>
|
|
public string StatusName { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Default value is string.Empty
|
|
/// </summary>
|
|
public string Uuid { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Default value is string.Empty
|
|
/// </summary>
|
|
[TemplatePlaceholder("[MESSAGE]")]
|
|
public string Message { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public DateTime AddedWhen { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public DateTime? ChangedWhen { get; set; }
|
|
|
|
/// <summary>
|
|
/// Default value is string.Empty
|
|
/// </summary>
|
|
[TemplatePlaceholder("[DOCUMENT_TITLE]")]
|
|
public string Title { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public ContractType? ContractType { get; set; }
|
|
|
|
/// <summary>
|
|
/// Default value is 'de-DE'
|
|
/// </summary>
|
|
public string Language { get; set; } = "de-DE";
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public int? EnvelopeTypeId { get; set; }
|
|
|
|
// TODO: use ReadAndConfirm property name
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[Obsolete("Use EnvelopeExtensions.IsReadAndConfirm extension metot instead.")]
|
|
public bool ReadOnly => this.IsReadAndConfirm();
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public CertificationType? CertificationType { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public int? FinalEmailToCreator { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public int? FinalEmailToReceivers { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public bool? SendReminderEmails { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public int? FirstReminderDays { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public int? ReminderIntervalDays { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public int? ExpiresWhenDays { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public int? ExpiresWarningWhenDays { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public bool UseAccessCode { get; set; } = true;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public bool TFAEnabled { get; init; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public UserReadDto? User { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public EnvelopeTypeDefaults? EnvelopeType { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string? EnvelopeTypeTitle { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public bool IsAlreadySent { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public byte[]? DocResult { get; init; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public IEnumerable<DocumentDto>? Documents { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public IEnumerable<EnvelopeReceiverDto>? EnvelopeReceivers { get; set; }
|
|
|
|
/// <summary>
|
|
/// Envelope history entries tracking actions like DocumentSigned, EnvelopeOpened, etc.
|
|
/// </summary>
|
|
public IEnumerable<HistoryDto>? Histories { get; set; }
|
|
}
|