migration

This commit is contained in:
Tizian.Breuch
2025-07-29 20:41:04 +02:00
parent 6fc6aaef3e
commit 9e6f668752
4 changed files with 22 additions and 10 deletions

View File

@@ -79,6 +79,7 @@ builder.Services.AddAuthorization(); // Aktiviert die Autorisierung
builder.Services.AddScoped<IProductRepository, ProductRepository>(); builder.Services.AddScoped<IProductRepository, ProductRepository>();
builder.Services.AddScoped<ISupplierRepository, SupplierRepository>(); builder.Services.AddScoped<ISupplierRepository, SupplierRepository>();
builder.Services.AddScoped<ICustomerRepository, CustomerRepository>(); builder.Services.AddScoped<ICustomerRepository, CustomerRepository>();
builder.Services.AddScoped<IPaymentMethodRepository, PaymentMethodRepository>();
// AUTH Services // AUTH Services
builder.Services.AddScoped<IAuthService, AuthService>(); builder.Services.AddScoped<IAuthService, AuthService>();
@@ -86,15 +87,23 @@ builder.Services.AddScoped<IAuthService, AuthService>();
// PUBLIC Services // PUBLIC Services
builder.Services.AddScoped<IProductService, ProductService>(); builder.Services.AddScoped<IProductService, ProductService>();
builder.Services.AddScoped<IPaymentMethodService, PaymentMethodService>(); builder.Services.AddScoped<IPaymentMethodService, PaymentMethodService>();
builder.Services.AddScoped<ICategoryService, CategoryService>();
// ADMIN Services // ADMIN Services
builder.Services.AddScoped<IAdminUserService, AdminUserService>(); builder.Services.AddScoped<IAdminUserService, AdminUserService>();
builder.Services.AddScoped<IAdminProductService, AdminProductService>(); builder.Services.AddScoped<IAdminProductService, AdminProductService>();
builder.Services.AddScoped<IAdminSupplierService, AdminSupplierService>(); builder.Services.AddScoped<IAdminSupplierService, AdminSupplierService>();
builder.Services.AddScoped<IAdminPaymentMethodService, AdminPaymentMethodService>(); builder.Services.AddScoped<IAdminPaymentMethodService, AdminPaymentMethodService>();
//builder.Services.AddScoped<IAdminCategoryService, AdminCategoryService>(); // Hinzugef<65>gt f<>r Konsistenz
//builder.Services.AddScoped<IAdminDiscountService, AdminDiscountService>(); // Hinzugef<65>gt f<>r Konsistenz
//builder.Services.AddScoped<IAdminOrderService, AdminOrderService>(); // Hinzugef<65>gt f<>r Konsistenz
//builder.Services.AddScoped<IAdminSettingService, AdminSettingService>(); // Hinzugef<65>gt f<>r Konsistenz
// CUSTOMER Services (sp<73>ter Implementierungen hinzuf<75>gen) // CUSTOMER Services (sp<73>ter Implementierungen hinzuf<75>gen)
builder.Services.AddScoped<ICustomerService, CustomerService>(); builder.Services.AddScoped<ICustomerService, CustomerService>();
//builder.Services.AddScoped<IOrderService, OrderService>(); // Hinzugef<65>gt f<>r Konsistenz
//builder.Services.AddScoped<ICheckoutService, CheckoutService>(); // Hinzugef<65>gt f<>r Konsistenz
//builder.Services.AddScoped<IReviewService, ReviewService>(); // Hinzugef<65>gt f<>r Konsistenz
// --- NEU: Resend E-Mail-Dienst konfigurieren --- // --- NEU: Resend E-Mail-Dienst konfigurieren ---
builder.Services.AddOptions(); // Stellt sicher, dass Options konfiguriert werden k<>nnen builder.Services.AddOptions(); // Stellt sicher, dass Options konfiguriert werden k<>nnen

View File

@@ -12,7 +12,7 @@ using Webshop.Infrastructure.Data;
namespace Webshop.Infrastructure.Migrations namespace Webshop.Infrastructure.Migrations
{ {
[DbContext(typeof(ApplicationDbContext))] [DbContext(typeof(ApplicationDbContext))]
[Migration("20250729160557_InitialCreate")] [Migration("20250729184055_InitialCreate")]
partial class InitialCreate partial class InitialCreate
{ {
/// <inheritdoc /> /// <inheritdoc />
@@ -521,6 +521,9 @@ namespace Webshop.Infrastructure.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("uuid"); .HasColumnType("uuid");
b.Property<string>("Configuration")
.HasColumnType("jsonb");
b.Property<string>("Description") b.Property<string>("Description")
.HasMaxLength(500) .HasMaxLength(500)
.HasColumnType("character varying(500)"); .HasColumnType("character varying(500)");
@@ -533,10 +536,8 @@ namespace Webshop.Infrastructure.Migrations
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("character varying(100)"); .HasColumnType("character varying(100)");
b.Property<string>("PaymentGatewayType") b.Property<int>("PaymentGatewayType")
.IsRequired() .HasColumnType("integer");
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<decimal?>("ProcessingFee") b.Property<decimal?>("ProcessingFee")
.HasPrecision(18, 2) .HasPrecision(18, 2)

View File

@@ -67,7 +67,8 @@ namespace Webshop.Infrastructure.Migrations
Name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false), Name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
Description = table.Column<string>(type: "character varying(500)", maxLength: 500, nullable: true), Description = table.Column<string>(type: "character varying(500)", maxLength: 500, nullable: true),
IsActive = table.Column<bool>(type: "boolean", nullable: false), IsActive = table.Column<bool>(type: "boolean", nullable: false),
PaymentGatewayType = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false), PaymentGatewayType = table.Column<int>(type: "integer", nullable: false),
Configuration = table.Column<string>(type: "jsonb", nullable: true),
ProcessingFee = table.Column<decimal>(type: "numeric(18,2)", precision: 18, scale: 2, nullable: true) ProcessingFee = table.Column<decimal>(type: "numeric(18,2)", precision: 18, scale: 2, nullable: true)
}, },
constraints: table => constraints: table =>

View File

@@ -518,6 +518,9 @@ namespace Webshop.Infrastructure.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("uuid"); .HasColumnType("uuid");
b.Property<string>("Configuration")
.HasColumnType("jsonb");
b.Property<string>("Description") b.Property<string>("Description")
.HasMaxLength(500) .HasMaxLength(500)
.HasColumnType("character varying(500)"); .HasColumnType("character varying(500)");
@@ -530,10 +533,8 @@ namespace Webshop.Infrastructure.Migrations
.HasMaxLength(100) .HasMaxLength(100)
.HasColumnType("character varying(100)"); .HasColumnType("character varying(100)");
b.Property<string>("PaymentGatewayType") b.Property<int>("PaymentGatewayType")
.IsRequired() .HasColumnType("integer");
.HasMaxLength(50)
.HasColumnType("character varying(50)");
b.Property<decimal?>("ProcessingFee") b.Property<decimal?>("ProcessingFee")
.HasPrecision(18, 2) .HasPrecision(18, 2)