mig
This commit is contained in:
@@ -12,7 +12,7 @@ using Webshop.Infrastructure.Data;
|
||||
namespace Webshop.Infrastructure.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20250801131532_FinalSchema")]
|
||||
[Migration("20250801133504_FinalSchema")]
|
||||
partial class FinalSchema
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@@ -218,6 +218,70 @@ namespace Webshop.Infrastructure.Migrations
|
||||
b.ToTable("Addresses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Webshop.Domain.Entities.Categorie", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedDate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("character varying(1000)");
|
||||
|
||||
b.Property<int>("DisplayOrder")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ImageUrl")
|
||||
.HasMaxLength(2000)
|
||||
.HasColumnType("character varying(2000)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTimeOffset?>("LastModifiedDate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)");
|
||||
|
||||
b.Property<Guid?>("ParentcategorieId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("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<Guid>("categorieId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("DiscountId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("categorieId", "DiscountId");
|
||||
|
||||
b.HasIndex("DiscountId");
|
||||
|
||||
b.ToTable("categorieDiscounts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Webshop.Domain.Entities.Customer", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@@ -812,70 +876,6 @@ namespace Webshop.Infrastructure.Migrations
|
||||
b.ToTable("Suppliers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Webshop.Domain.Entities.categorie", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedDate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("character varying(1000)");
|
||||
|
||||
b.Property<int>("DisplayOrder")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ImageUrl")
|
||||
.HasMaxLength(2000)
|
||||
.HasColumnType("character varying(2000)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTimeOffset?>("LastModifiedDate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)");
|
||||
|
||||
b.Property<Guid?>("ParentcategorieId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("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<Guid>("categorieId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("DiscountId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("categorieId", "DiscountId");
|
||||
|
||||
b.HasIndex("DiscountId");
|
||||
|
||||
b.ToTable("categorieDiscounts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Webshop.Domain.Identity.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("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");
|
||||
@@ -215,6 +215,70 @@ namespace Webshop.Infrastructure.Migrations
|
||||
b.ToTable("Addresses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Webshop.Domain.Entities.Categorie", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedDate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("character varying(1000)");
|
||||
|
||||
b.Property<int>("DisplayOrder")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ImageUrl")
|
||||
.HasMaxLength(2000)
|
||||
.HasColumnType("character varying(2000)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTimeOffset?>("LastModifiedDate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)");
|
||||
|
||||
b.Property<Guid?>("ParentcategorieId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("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<Guid>("categorieId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("DiscountId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("categorieId", "DiscountId");
|
||||
|
||||
b.HasIndex("DiscountId");
|
||||
|
||||
b.ToTable("categorieDiscounts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Webshop.Domain.Entities.Customer", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@@ -809,70 +873,6 @@ namespace Webshop.Infrastructure.Migrations
|
||||
b.ToTable("Suppliers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Webshop.Domain.Entities.categorie", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedDate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("character varying(1000)");
|
||||
|
||||
b.Property<int>("DisplayOrder")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("ImageUrl")
|
||||
.HasMaxLength(2000)
|
||||
.HasColumnType("character varying(2000)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTimeOffset?>("LastModifiedDate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("character varying(255)");
|
||||
|
||||
b.Property<Guid?>("ParentcategorieId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("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<Guid>("categorieId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("DiscountId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("categorieId", "DiscountId");
|
||||
|
||||
b.HasIndex("DiscountId");
|
||||
|
||||
b.ToTable("categorieDiscounts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Webshop.Domain.Identity.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("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");
|
||||
|
||||
Reference in New Issue
Block a user