32 lines
1.2 KiB
C#

using DigitalData.Core.Abstractions;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_CONFIG", Schema = "dbo")]
public class Config : IUnique<int>
{
[Column("DOCUMENT_PATH", TypeName = "nvarchar(256)")]
public string? DocumentPath { get; init; }
[Column("SENDING_PROFILE", TypeName = "int")]
[Required]
public required int SendingProfile { get; init; }
[Column("SIGNATURE_HOST", TypeName = "nvarchar(128)")]
public string? SignatureHost { get; init; }
[Column("EXTERNAL_PROGRAM_NAME", TypeName = "nvarchar(30)")]
public string? ExternalProgramName { get; init; }
[Column("EXPORT_PATH", TypeName = "nvarchar(256)")]
public string? ExportPath { get; init; }
[Obsolete("Configuration does not have an ID; it represents a single table in the database.")]
[NotMapped]
[JsonIgnore]
public int Id => throw new InvalidOperationException("This configuration does not support an ID as it represents a single table in the database.");
}
}