diff --git a/EnvelopeGenerator.Application/DTOs/ConfigDto.cs b/EnvelopeGenerator.Application/DTOs/ConfigDto.cs index f96f131d..2dc76824 100644 --- a/EnvelopeGenerator.Application/DTOs/ConfigDto.cs +++ b/EnvelopeGenerator.Application/DTOs/ConfigDto.cs @@ -1,4 +1,5 @@ using DigitalData.Core.Abstractions; +using System.ComponentModel.DataAnnotations.Schema; using System.Text.Json.Serialization; namespace EnvelopeGenerator.Application.DTOs @@ -8,11 +9,9 @@ namespace EnvelopeGenerator.Application.DTOs int SendingProfile, string SignatureHost, string ExternalProgramName, - string ExportPath, - string DocumentPathDmz, - string ExportPathDmz, - string DocumentPathMoveAftsend) : IUnique + string ExportPath) : IUnique { + [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."); diff --git a/EnvelopeGenerator.Domain/Entities/Config.cs b/EnvelopeGenerator.Domain/Entities/Config.cs index 6621beb5..0f5d48e5 100644 --- a/EnvelopeGenerator.Domain/Entities/Config.cs +++ b/EnvelopeGenerator.Domain/Entities/Config.cs @@ -1,6 +1,7 @@ using DigitalData.Core.Abstractions; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using System.Text.Json.Serialization; namespace EnvelopeGenerator.Domain.Entities { @@ -23,19 +24,9 @@ namespace EnvelopeGenerator.Domain.Entities [Column("EXPORT_PATH", TypeName = "nvarchar(256)")] public string? ExportPath { get; init; } - [Column("DOCUMENT_PATH_DMZ", TypeName = "nvarchar(512)")] - [Required] - public string? DocumentPathDmz { get; init; } - - [Column("EXPORT_PATH_DMZ", TypeName = "nvarchar(512)")] - [Required] - public required string ExportPathDmz { get; init; } - - [Column("DOCUMENT_PATH_MOVE_AFTSEND", TypeName = "nvarchar(512)")] - [Required] - public required string DocumentPathMoveAftsend { 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."); } } \ No newline at end of file diff --git a/EnvelopeGenerator.Web/Services/EnvelopeOldService.cs b/EnvelopeGenerator.Web/Services/EnvelopeOldService.cs index f8786918..8dcd4d61 100644 --- a/EnvelopeGenerator.Web/Services/EnvelopeOldService.cs +++ b/EnvelopeGenerator.Web/Services/EnvelopeOldService.cs @@ -98,13 +98,6 @@ namespace EnvelopeGenerator.Web.Services //if documenet_path_dmz is existing in config, replace the path with it var config = await _configService.ReadDefaultAsync(); - if (config.DocumentPathDmz is not null && config.DocumentPathDmz != string.Empty) - foreach (var doc in envelope.Documents) - { - doc.Filepath = doc.Filepath.Replace(config.DocumentPath, config.DocumentPathDmz); - } - - return new() { Receiver = receiver,