Transitioned from records to classes for flexibility, added XML documentation for clarity, and updated property definitions to use standard getters and setters. Introduced the `required` keyword for essential properties, removed unnecessary constructors, and enhanced property descriptions for better readability. Additionally, overridden `GetHashCode` in `ReceiverReadDto` for proper collection behavior.
47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
using DigitalData.Core.Abstractions;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace EnvelopeGenerator.Application.DTOs;
|
|
|
|
/// <summary>
|
|
/// Data Transfer Object representing configuration settings.
|
|
/// </summary>
|
|
[ApiExplorerSettings(IgnoreApi = true)]
|
|
public class ConfigDto : IUnique<int>
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the path to the document.
|
|
/// </summary>
|
|
public string DocumentPath { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the sending profile identifier.
|
|
/// </summary>
|
|
public int SendingProfile { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the signature host URL or name.
|
|
/// </summary>
|
|
public string SignatureHost { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the name of the external program.
|
|
/// </summary>
|
|
public string ExternalProgramName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the path where exports will be saved.
|
|
/// </summary>
|
|
public string ExportPath { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets the ID of the configuration.
|
|
/// This DTO represents a single row in the database and does not support an ID.
|
|
/// </summary>
|
|
[NotMapped]
|
|
[JsonIgnore]
|
|
[Obsolete("Configuration does not have an ID; it represents a single table in the database.")]
|
|
public int Id => throw new InvalidOperationException("This configuration does not support an ID as it represents a single row in the database.");
|
|
} |