refactor(EnvelopeCertificate): Entfernen Sie die Domäne, das Repository, die DTOs und den Dienst mit allen Schnittstellen.
This commit is contained in:
parent
a2471a0c35
commit
12519f06f7
@ -1,12 +0,0 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Obsolete("Use Read-method returning IReadQuery<TEntity> instead.")]
|
||||
public interface IEnvelopeCertificateRepository : ICRUDRepository<EnvelopeCertificate, int>
|
||||
{
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
using DigitalData.Core.Abstraction.Application;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Obsolete("Use MediatR")]
|
||||
public interface IEnvelopeCertificateService : IBasicCRUDService<EnvelopeCertificateDto, EnvelopeCertificate, int>
|
||||
{
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// Data Transfer Object representing certificate information for an envelope.
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class EnvelopeCertificateDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the unique identifier of the certificate.
|
||||
/// </summary>
|
||||
public int Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the envelope ID associated with the certificate.
|
||||
/// </summary>
|
||||
public int EnvelopeId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the UUID of the envelope.
|
||||
/// </summary>
|
||||
public string EnvelopeUuid { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the subject of the envelope.
|
||||
/// </summary>
|
||||
public string EnvelopeSubject { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the ID of the creator of the envelope.
|
||||
/// </summary>
|
||||
public int CreatorId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the creator.
|
||||
/// </summary>
|
||||
public string CreatorName { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the email address of the creator.
|
||||
/// </summary>
|
||||
public string CreatorEmail { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current status of the envelope.
|
||||
/// </summary>
|
||||
public int EnvelopeStatus { get; init; }
|
||||
}
|
||||
@ -27,7 +27,6 @@ public class MappingProfile : Profile
|
||||
CreateMap<DocumentStatus, DocumentStatusDto>();
|
||||
CreateMap<EmailTemplate, EmailTemplateDto>();
|
||||
CreateMap<Envelope, EnvelopeDto>();
|
||||
CreateMap<EnvelopeCertificate, EnvelopeCertificateDto>();
|
||||
CreateMap<EnvelopeDocument, EnvelopeDocumentDto>();
|
||||
CreateMap<Domain.Entities.EnvelopeHistory, EnvelopeHistoryDto>();
|
||||
CreateMap<Domain.Entities.EnvelopeHistory, EnvelopeHistoryCreateDto>();
|
||||
@ -45,7 +44,6 @@ public class MappingProfile : Profile
|
||||
CreateMap<DocumentStatusDto, DocumentStatus>();
|
||||
CreateMap<EmailTemplateDto, EmailTemplate>();
|
||||
CreateMap<EnvelopeDto, Envelope>();
|
||||
CreateMap<EnvelopeCertificateDto, EnvelopeCertificate>();
|
||||
CreateMap<EnvelopeDocumentDto, EnvelopeDocument>();
|
||||
CreateMap<EnvelopeHistoryDto, Domain.Entities.EnvelopeHistory>();
|
||||
CreateMap<EnvelopeHistoryCreateDto, Domain.Entities.EnvelopeHistory>();
|
||||
|
||||
@ -33,7 +33,6 @@ public static class DependencyInjection
|
||||
services.TryAddScoped<IDocumentStatusService, DocumentStatusService>();
|
||||
services.TryAddScoped<IEmailTemplateService, EmailTemplateService>();
|
||||
services.TryAddScoped<IEnvelopeService, EnvelopeService>();
|
||||
services.TryAddScoped<IEnvelopeCertificateService, EnvelopeCertificateService>();
|
||||
services.TryAddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
|
||||
services.TryAddScoped<IEnvelopeReceiverService, EnvelopeReceiverService>();
|
||||
services.TryAddScoped<IEnvelopeTypeService, EnvelopeTypeService>();
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Application;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
using EnvelopeGenerator.Application.Contracts.Services;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Obsolete("Use MediatR")]
|
||||
public class EnvelopeCertificateService : BasicCRUDService<IEnvelopeCertificateRepository, EnvelopeCertificateDto, EnvelopeCertificate, int>, IEnvelopeCertificateService
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="repository"></param>
|
||||
/// <param name="mapper"></param>
|
||||
public EnvelopeCertificateService(IEnvelopeCertificateRepository repository, IMapper mapper)
|
||||
: base(repository, mapper)
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_ENVELOPE_CERTIFICATE", Schema = "dbo")]
|
||||
public class EnvelopeCertificate
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ENVELOPE_ID")]
|
||||
public int EnvelopeId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
|
||||
public string EnvelopeUuid { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ENVELOPE_SUBJECT", TypeName = "nvarchar(512)")]
|
||||
public string EnvelopeSubject { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("CREATOR_ID")]
|
||||
public int CreatorId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("CREATOR_NAME", TypeName = "nvarchar(128)")]
|
||||
public string CreatorName { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("CREATOR_EMAIL", TypeName = "nvarchar(128)")]
|
||||
public string CreatorEmail { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ENVELOPE_STATUS")]
|
||||
public int EnvelopeStatus { get; set; }
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,6 @@ public static class DIExtensions
|
||||
services.TryAddScoped<IDocumentStatusRepository, DocumentStatusRepository>();
|
||||
services.TryAddScoped<IEmailTemplateRepository, EmailTemplateRepository>();
|
||||
services.TryAddScoped<IEnvelopeRepository, EnvelopeRepository>();
|
||||
services.TryAddScoped<IEnvelopeCertificateRepository, EnvelopeCertificateRepository>();
|
||||
services.TryAddScoped<IEnvelopeHistoryRepository, EnvelopeHistoryRepository>();
|
||||
services.TryAddScoped<IEnvelopeReceiverRepository, EnvelopeReceiverRepository>();
|
||||
services.TryAddScoped<IEnvelopeTypeRepository, EnvelopeTypeRepository>();
|
||||
@ -61,7 +60,6 @@ public static class DIExtensions
|
||||
services.AddDbRepository<EGDbContext, DocumentStatus>(context => context.DocumentStatus).UseAutoMapper();
|
||||
services.AddDbRepository<EGDbContext, EmailTemplate>(context => context.EmailTemplate).UseAutoMapper();
|
||||
services.AddDbRepository<EGDbContext, Envelope>(context => context.Envelopes).UseAutoMapper();
|
||||
services.AddDbRepository<EGDbContext, EnvelopeCertificate>(context => context.EnvelopeCertificates).UseAutoMapper();
|
||||
services.AddDbRepository<EGDbContext, EnvelopeHistory>(context => context.EnvelopeHistories).UseAutoMapper();
|
||||
services.AddDbRepository<EGDbContext, EnvelopeReceiver>(context => context.EnvelopeReceivers).UseAutoMapper();
|
||||
services.AddDbRepository<EGDbContext, EnvelopeType>(context => context.EnvelopeTypes).UseAutoMapper();
|
||||
|
||||
@ -29,8 +29,6 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
|
||||
|
||||
public DbSet<EmailTemplate> EmailTemplate { get; set; }
|
||||
|
||||
public DbSet<EnvelopeCertificate> EnvelopeCertificates { get; set; }
|
||||
|
||||
public DbSet<EnvelopeDocument> EnvelopeDocument { get; set; }
|
||||
|
||||
public DbSet<EnvelopeHistory> EnvelopeHistories { get; set; }
|
||||
@ -73,7 +71,6 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
|
||||
Envelopes = Set<Envelope>();
|
||||
DocumentReceiverElements = Set<DocumentReceiverElement>();
|
||||
DocumentStatus = Set<DocumentStatus>();
|
||||
EnvelopeCertificates = Set<EnvelopeCertificate>();
|
||||
EnvelopeDocument = Set<EnvelopeDocument>();
|
||||
EnvelopeHistories = Set<EnvelopeHistory>();
|
||||
EnvelopeTypes = Set<EnvelopeType>();
|
||||
@ -101,7 +98,6 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
|
||||
modelBuilder.Entity<DocumentStatus>();
|
||||
modelBuilder.Entity<EmailTemplate>();
|
||||
modelBuilder.Entity<Envelope>();
|
||||
modelBuilder.Entity<EnvelopeCertificate>();
|
||||
modelBuilder.Entity<EnvelopeHistory>();
|
||||
modelBuilder.Entity<EnvelopeType>();
|
||||
modelBuilder.Entity<Receiver>();
|
||||
@ -165,7 +161,6 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
|
||||
AddTrigger<DocumentStatus>();
|
||||
AddTrigger<EmailTemplate>();
|
||||
AddTrigger<Envelope>();
|
||||
AddTrigger<EnvelopeCertificate>();
|
||||
AddTrigger<EnvelopeDocument>();
|
||||
AddTrigger<EnvelopeHistory>();
|
||||
AddTrigger<EnvelopeReceiver>();
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
using DigitalData.Core.Infrastructure;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
namespace EnvelopeGenerator.Infrastructure.Repositories;
|
||||
|
||||
[Obsolete("Use IRepository")]
|
||||
public class EnvelopeCertificateRepository : CRUDRepository<EnvelopeCertificate, int, EGDbContext>, IEnvelopeCertificateRepository
|
||||
{
|
||||
public EnvelopeCertificateRepository(EGDbContext dbContext) : base(dbContext, dbContext.EnvelopeCertificates)
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
using EnvelopeGenerator.Application.Contracts.Services;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Controllers.Test;
|
||||
|
||||
[Obsolete("Use MediatR")]
|
||||
public class TestEnvelopeCertificateController : TestControllerBase<IEnvelopeCertificateService, EnvelopeCertificateDto, EnvelopeCertificate, int>
|
||||
{
|
||||
public TestEnvelopeCertificateController(ILogger<TestEnvelopeCertificateController> logger, IEnvelopeCertificateService service) : base(logger, service)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user