From 69b2b4bf845a4499e0bec82bf00be05aed9f5084 Mon Sep 17 00:00:00 2001 From: "Tizian.Breuch" Date: Fri, 1 Aug 2025 15:35:28 +0200 Subject: [PATCH] mig --- ...=> 20250801133504_FinalSchema.Designer.cs} | 198 +++++++++--------- ...chema.cs => 20250801133504_FinalSchema.cs} | 0 .../ApplicationDbContextModelSnapshot.cs | 196 ++++++++--------- 3 files changed, 197 insertions(+), 197 deletions(-) rename Webshop.Infrastructure/Migrations/{20250801131532_FinalSchema.Designer.cs => 20250801133504_FinalSchema.Designer.cs} (98%) rename Webshop.Infrastructure/Migrations/{20250801131532_FinalSchema.cs => 20250801133504_FinalSchema.cs} (100%) diff --git a/Webshop.Infrastructure/Migrations/20250801131532_FinalSchema.Designer.cs b/Webshop.Infrastructure/Migrations/20250801133504_FinalSchema.Designer.cs similarity index 98% rename from Webshop.Infrastructure/Migrations/20250801131532_FinalSchema.Designer.cs rename to Webshop.Infrastructure/Migrations/20250801133504_FinalSchema.Designer.cs index 91cde8a..df14207 100644 --- a/Webshop.Infrastructure/Migrations/20250801131532_FinalSchema.Designer.cs +++ b/Webshop.Infrastructure/Migrations/20250801133504_FinalSchema.Designer.cs @@ -12,7 +12,7 @@ using Webshop.Infrastructure.Data; namespace Webshop.Infrastructure.Migrations { [DbContext(typeof(ApplicationDbContext))] - [Migration("20250801131532_FinalSchema")] + [Migration("20250801133504_FinalSchema")] partial class FinalSchema { /// @@ -218,6 +218,70 @@ namespace Webshop.Infrastructure.Migrations b.ToTable("Addresses"); }); + modelBuilder.Entity("Webshop.Domain.Entities.Categorie", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreatedDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)"); + + b.Property("DisplayOrder") + .HasColumnType("integer"); + + b.Property("ImageUrl") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)"); + + b.Property("IsActive") + .HasColumnType("boolean"); + + b.Property("LastModifiedDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("ParentcategorieId") + .HasColumnType("uuid"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.HasKey("Id"); + + b.HasIndex("ParentcategorieId"); + + b.HasIndex("Slug") + .IsUnique(); + + b.ToTable("categories"); + }); + + modelBuilder.Entity("Webshop.Domain.Entities.CategorieDiscount", b => + { + b.Property("categorieId") + .HasColumnType("uuid"); + + b.Property("DiscountId") + .HasColumnType("uuid"); + + b.HasKey("categorieId", "DiscountId"); + + b.HasIndex("DiscountId"); + + b.ToTable("categorieDiscounts"); + }); + modelBuilder.Entity("Webshop.Domain.Entities.Customer", b => { b.Property("Id") @@ -812,70 +876,6 @@ namespace Webshop.Infrastructure.Migrations b.ToTable("Suppliers"); }); - modelBuilder.Entity("Webshop.Domain.Entities.categorie", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)"); - - b.Property("DisplayOrder") - .HasColumnType("integer"); - - b.Property("ImageUrl") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("IsActive") - .HasColumnType("boolean"); - - b.Property("LastModifiedDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.Property("ParentcategorieId") - .HasColumnType("uuid"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.HasKey("Id"); - - b.HasIndex("ParentcategorieId"); - - b.HasIndex("Slug") - .IsUnique(); - - b.ToTable("categories"); - }); - - modelBuilder.Entity("Webshop.Domain.Entities.categorieDiscount", b => - { - b.Property("categorieId") - .HasColumnType("uuid"); - - b.Property("DiscountId") - .HasColumnType("uuid"); - - b.HasKey("categorieId", "DiscountId"); - - b.HasIndex("DiscountId"); - - b.ToTable("categorieDiscounts"); - }); - modelBuilder.Entity("Webshop.Domain.Identity.ApplicationUser", b => { b.Property("Id") @@ -1006,6 +1006,35 @@ namespace Webshop.Infrastructure.Migrations b.Navigation("Customer"); }); + modelBuilder.Entity("Webshop.Domain.Entities.Categorie", b => + { + b.HasOne("Webshop.Domain.Entities.Categorie", "Parentcategorie") + .WithMany("Subcategories") + .HasForeignKey("ParentcategorieId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Parentcategorie"); + }); + + modelBuilder.Entity("Webshop.Domain.Entities.CategorieDiscount", b => + { + b.HasOne("Webshop.Domain.Entities.Discount", "Discount") + .WithMany("categorieDiscounts") + .HasForeignKey("DiscountId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Webshop.Domain.Entities.Categorie", "categorie") + .WithMany("categorieDiscounts") + .HasForeignKey("categorieId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Discount"); + + b.Navigation("categorie"); + }); + modelBuilder.Entity("Webshop.Domain.Entities.Customer", b => { b.HasOne("Webshop.Domain.Identity.ApplicationUser", "User") @@ -1126,7 +1155,7 @@ namespace Webshop.Infrastructure.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Webshop.Domain.Entities.categorie", "categorie") + b.HasOne("Webshop.Domain.Entities.Categorie", "categorie") .WithMany("Productcategories") .HasForeignKey("categorieId") .OnDelete(DeleteBehavior.Cascade) @@ -1163,33 +1192,13 @@ namespace Webshop.Infrastructure.Migrations b.Navigation("Address"); }); - modelBuilder.Entity("Webshop.Domain.Entities.categorie", b => + modelBuilder.Entity("Webshop.Domain.Entities.Categorie", b => { - b.HasOne("Webshop.Domain.Entities.categorie", "Parentcategorie") - .WithMany("Subcategories") - .HasForeignKey("ParentcategorieId") - .OnDelete(DeleteBehavior.Restrict); + b.Navigation("Productcategories"); - b.Navigation("Parentcategorie"); - }); + b.Navigation("Subcategories"); - modelBuilder.Entity("Webshop.Domain.Entities.categorieDiscount", b => - { - b.HasOne("Webshop.Domain.Entities.Discount", "Discount") - .WithMany("categorieDiscounts") - .HasForeignKey("DiscountId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Webshop.Domain.Entities.categorie", "categorie") - .WithMany("categorieDiscounts") - .HasForeignKey("categorieId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Discount"); - - b.Navigation("categorie"); + b.Navigation("categorieDiscounts"); }); modelBuilder.Entity("Webshop.Domain.Entities.Customer", b => @@ -1229,15 +1238,6 @@ namespace Webshop.Infrastructure.Migrations b.Navigation("Products"); }); - modelBuilder.Entity("Webshop.Domain.Entities.categorie", b => - { - b.Navigation("Productcategories"); - - b.Navigation("Subcategories"); - - b.Navigation("categorieDiscounts"); - }); - modelBuilder.Entity("Webshop.Domain.Identity.ApplicationUser", b => { b.Navigation("Customer"); diff --git a/Webshop.Infrastructure/Migrations/20250801131532_FinalSchema.cs b/Webshop.Infrastructure/Migrations/20250801133504_FinalSchema.cs similarity index 100% rename from Webshop.Infrastructure/Migrations/20250801131532_FinalSchema.cs rename to Webshop.Infrastructure/Migrations/20250801133504_FinalSchema.cs diff --git a/Webshop.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs b/Webshop.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs index 6697329..396f40b 100644 --- a/Webshop.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Webshop.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs @@ -215,6 +215,70 @@ namespace Webshop.Infrastructure.Migrations b.ToTable("Addresses"); }); + modelBuilder.Entity("Webshop.Domain.Entities.Categorie", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("CreatedDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)"); + + b.Property("DisplayOrder") + .HasColumnType("integer"); + + b.Property("ImageUrl") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)"); + + b.Property("IsActive") + .HasColumnType("boolean"); + + b.Property("LastModifiedDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.Property("ParentcategorieId") + .HasColumnType("uuid"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)"); + + b.HasKey("Id"); + + b.HasIndex("ParentcategorieId"); + + b.HasIndex("Slug") + .IsUnique(); + + b.ToTable("categories"); + }); + + modelBuilder.Entity("Webshop.Domain.Entities.CategorieDiscount", b => + { + b.Property("categorieId") + .HasColumnType("uuid"); + + b.Property("DiscountId") + .HasColumnType("uuid"); + + b.HasKey("categorieId", "DiscountId"); + + b.HasIndex("DiscountId"); + + b.ToTable("categorieDiscounts"); + }); + modelBuilder.Entity("Webshop.Domain.Entities.Customer", b => { b.Property("Id") @@ -809,70 +873,6 @@ namespace Webshop.Infrastructure.Migrations b.ToTable("Suppliers"); }); - modelBuilder.Entity("Webshop.Domain.Entities.categorie", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)"); - - b.Property("DisplayOrder") - .HasColumnType("integer"); - - b.Property("ImageUrl") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("IsActive") - .HasColumnType("boolean"); - - b.Property("LastModifiedDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.Property("ParentcategorieId") - .HasColumnType("uuid"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("character varying(255)"); - - b.HasKey("Id"); - - b.HasIndex("ParentcategorieId"); - - b.HasIndex("Slug") - .IsUnique(); - - b.ToTable("categories"); - }); - - modelBuilder.Entity("Webshop.Domain.Entities.categorieDiscount", b => - { - b.Property("categorieId") - .HasColumnType("uuid"); - - b.Property("DiscountId") - .HasColumnType("uuid"); - - b.HasKey("categorieId", "DiscountId"); - - b.HasIndex("DiscountId"); - - b.ToTable("categorieDiscounts"); - }); - modelBuilder.Entity("Webshop.Domain.Identity.ApplicationUser", b => { b.Property("Id") @@ -1003,6 +1003,35 @@ namespace Webshop.Infrastructure.Migrations b.Navigation("Customer"); }); + modelBuilder.Entity("Webshop.Domain.Entities.Categorie", b => + { + b.HasOne("Webshop.Domain.Entities.Categorie", "Parentcategorie") + .WithMany("Subcategories") + .HasForeignKey("ParentcategorieId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Parentcategorie"); + }); + + modelBuilder.Entity("Webshop.Domain.Entities.CategorieDiscount", b => + { + b.HasOne("Webshop.Domain.Entities.Discount", "Discount") + .WithMany("categorieDiscounts") + .HasForeignKey("DiscountId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Webshop.Domain.Entities.Categorie", "categorie") + .WithMany("categorieDiscounts") + .HasForeignKey("categorieId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Discount"); + + b.Navigation("categorie"); + }); + modelBuilder.Entity("Webshop.Domain.Entities.Customer", b => { b.HasOne("Webshop.Domain.Identity.ApplicationUser", "User") @@ -1123,7 +1152,7 @@ namespace Webshop.Infrastructure.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Webshop.Domain.Entities.categorie", "categorie") + b.HasOne("Webshop.Domain.Entities.Categorie", "categorie") .WithMany("Productcategories") .HasForeignKey("categorieId") .OnDelete(DeleteBehavior.Cascade) @@ -1160,33 +1189,13 @@ namespace Webshop.Infrastructure.Migrations b.Navigation("Address"); }); - modelBuilder.Entity("Webshop.Domain.Entities.categorie", b => + modelBuilder.Entity("Webshop.Domain.Entities.Categorie", b => { - b.HasOne("Webshop.Domain.Entities.categorie", "Parentcategorie") - .WithMany("Subcategories") - .HasForeignKey("ParentcategorieId") - .OnDelete(DeleteBehavior.Restrict); + b.Navigation("Productcategories"); - b.Navigation("Parentcategorie"); - }); + b.Navigation("Subcategories"); - modelBuilder.Entity("Webshop.Domain.Entities.categorieDiscount", b => - { - b.HasOne("Webshop.Domain.Entities.Discount", "Discount") - .WithMany("categorieDiscounts") - .HasForeignKey("DiscountId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Webshop.Domain.Entities.categorie", "categorie") - .WithMany("categorieDiscounts") - .HasForeignKey("categorieId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Discount"); - - b.Navigation("categorie"); + b.Navigation("categorieDiscounts"); }); modelBuilder.Entity("Webshop.Domain.Entities.Customer", b => @@ -1226,15 +1235,6 @@ namespace Webshop.Infrastructure.Migrations b.Navigation("Products"); }); - modelBuilder.Entity("Webshop.Domain.Entities.categorie", b => - { - b.Navigation("Productcategories"); - - b.Navigation("Subcategories"); - - b.Navigation("categorieDiscounts"); - }); - modelBuilder.Entity("Webshop.Domain.Identity.ApplicationUser", b => { b.Navigation("Customer");