From 9e6f668752f60d1d68bf358e52c21cc8247d66ef Mon Sep 17 00:00:00 2001 From: "Tizian.Breuch" Date: Tue, 29 Jul 2025 20:41:04 +0200 Subject: [PATCH] migration --- Webshop.Api/Program.cs | 9 +++++++++ ...er.cs => 20250729184055_InitialCreate.Designer.cs} | 11 ++++++----- ...itialCreate.cs => 20250729184055_InitialCreate.cs} | 3 ++- .../Migrations/ApplicationDbContextModelSnapshot.cs | 9 +++++---- 4 files changed, 22 insertions(+), 10 deletions(-) rename Webshop.Infrastructure/Migrations/{20250729160557_InitialCreate.Designer.cs => 20250729184055_InitialCreate.Designer.cs} (99%) rename Webshop.Infrastructure/Migrations/{20250729160557_InitialCreate.cs => 20250729184055_InitialCreate.cs} (99%) diff --git a/Webshop.Api/Program.cs b/Webshop.Api/Program.cs index a5c7295..1eaf5ce 100644 --- a/Webshop.Api/Program.cs +++ b/Webshop.Api/Program.cs @@ -79,6 +79,7 @@ builder.Services.AddAuthorization(); // Aktiviert die Autorisierung builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); +builder.Services.AddScoped(); // AUTH Services builder.Services.AddScoped(); @@ -86,15 +87,23 @@ builder.Services.AddScoped(); // PUBLIC Services builder.Services.AddScoped(); builder.Services.AddScoped(); +builder.Services.AddScoped(); // ADMIN Services builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); +//builder.Services.AddScoped(); // Hinzugefügt für Konsistenz +//builder.Services.AddScoped(); // Hinzugefügt für Konsistenz +//builder.Services.AddScoped(); // Hinzugefügt für Konsistenz +//builder.Services.AddScoped(); // Hinzugefügt für Konsistenz // CUSTOMER Services (später Implementierungen hinzufügen) builder.Services.AddScoped(); +//builder.Services.AddScoped(); // Hinzugefügt für Konsistenz +//builder.Services.AddScoped(); // Hinzugefügt für Konsistenz +//builder.Services.AddScoped(); // Hinzugefügt für Konsistenz // --- NEU: Resend E-Mail-Dienst konfigurieren --- builder.Services.AddOptions(); // Stellt sicher, dass Options konfiguriert werden können diff --git a/Webshop.Infrastructure/Migrations/20250729160557_InitialCreate.Designer.cs b/Webshop.Infrastructure/Migrations/20250729184055_InitialCreate.Designer.cs similarity index 99% rename from Webshop.Infrastructure/Migrations/20250729160557_InitialCreate.Designer.cs rename to Webshop.Infrastructure/Migrations/20250729184055_InitialCreate.Designer.cs index 781df3e..8e14d05 100644 --- a/Webshop.Infrastructure/Migrations/20250729160557_InitialCreate.Designer.cs +++ b/Webshop.Infrastructure/Migrations/20250729184055_InitialCreate.Designer.cs @@ -12,7 +12,7 @@ using Webshop.Infrastructure.Data; namespace Webshop.Infrastructure.Migrations { [DbContext(typeof(ApplicationDbContext))] - [Migration("20250729160557_InitialCreate")] + [Migration("20250729184055_InitialCreate")] partial class InitialCreate { /// @@ -521,6 +521,9 @@ namespace Webshop.Infrastructure.Migrations .ValueGeneratedOnAdd() .HasColumnType("uuid"); + b.Property("Configuration") + .HasColumnType("jsonb"); + b.Property("Description") .HasMaxLength(500) .HasColumnType("character varying(500)"); @@ -533,10 +536,8 @@ namespace Webshop.Infrastructure.Migrations .HasMaxLength(100) .HasColumnType("character varying(100)"); - b.Property("PaymentGatewayType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)"); + b.Property("PaymentGatewayType") + .HasColumnType("integer"); b.Property("ProcessingFee") .HasPrecision(18, 2) diff --git a/Webshop.Infrastructure/Migrations/20250729160557_InitialCreate.cs b/Webshop.Infrastructure/Migrations/20250729184055_InitialCreate.cs similarity index 99% rename from Webshop.Infrastructure/Migrations/20250729160557_InitialCreate.cs rename to Webshop.Infrastructure/Migrations/20250729184055_InitialCreate.cs index 55ffd3f..ce9fe41 100644 --- a/Webshop.Infrastructure/Migrations/20250729160557_InitialCreate.cs +++ b/Webshop.Infrastructure/Migrations/20250729184055_InitialCreate.cs @@ -67,7 +67,8 @@ namespace Webshop.Infrastructure.Migrations Name = table.Column(type: "character varying(100)", maxLength: 100, nullable: false), Description = table.Column(type: "character varying(500)", maxLength: 500, nullable: true), IsActive = table.Column(type: "boolean", nullable: false), - PaymentGatewayType = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), + PaymentGatewayType = table.Column(type: "integer", nullable: false), + Configuration = table.Column(type: "jsonb", nullable: true), ProcessingFee = table.Column(type: "numeric(18,2)", precision: 18, scale: 2, nullable: true) }, constraints: table => diff --git a/Webshop.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs b/Webshop.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs index 51deea3..0528b75 100644 --- a/Webshop.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Webshop.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs @@ -518,6 +518,9 @@ namespace Webshop.Infrastructure.Migrations .ValueGeneratedOnAdd() .HasColumnType("uuid"); + b.Property("Configuration") + .HasColumnType("jsonb"); + b.Property("Description") .HasMaxLength(500) .HasColumnType("character varying(500)"); @@ -530,10 +533,8 @@ namespace Webshop.Infrastructure.Migrations .HasMaxLength(100) .HasColumnType("character varying(100)"); - b.Property("PaymentGatewayType") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)"); + b.Property("PaymentGatewayType") + .HasColumnType("integer"); b.Property("ProcessingFee") .HasPrecision(18, 2)