// using System; using System.Collections.Generic; using Commerce.Domain; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace Commerce.Domain.Migrations { [DbContext(typeof(Context))] [Migration("20260119105451_MultiLanguageSupport")] partial class MultiLanguageSupport { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "10.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Commerce.Domain.Entities.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property>("Description") .IsRequired() .HasColumnType("jsonb"); b.Property("IsBundle") .HasColumnType("boolean"); b.Property>("Name") .IsRequired() .HasColumnType("jsonb"); b.Property("ParentCategoryId") .HasColumnType("uuid"); b.PrimitiveCollection("Photos") .IsRequired() .HasColumnType("text[]"); b.HasKey("Id"); b.HasIndex("ParentCategoryId"); b.ToTable("Categories"); }); modelBuilder.Entity("Commerce.Domain.Entities.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CategoryId") .HasColumnType("uuid"); b.Property("CategoryName") .HasColumnType("text"); b.Property("CodeName") .IsRequired() .HasColumnType("text"); b.Property("Created") .HasColumnType("timestamp with time zone"); b.Property>("Description") .IsRequired() .HasColumnType("jsonb"); b.Property("Discount") .HasColumnType("double precision"); b.Property("IsBundle") .HasColumnType("boolean"); b.Property>("Name") .IsRequired() .HasColumnType("jsonb"); b.PrimitiveCollection("Photos") .IsRequired() .HasColumnType("text[]"); b.Property("Price") .HasColumnType("double precision"); b.Property("ProductId") .HasColumnType("uuid"); b.Property>("TechnicalDetails") .IsRequired() .HasColumnType("jsonb"); b.HasKey("Id"); b.HasIndex("CategoryId"); b.HasIndex("ProductId"); b.ToTable("Products"); }); modelBuilder.Entity("Commerce.Domain.Entities.Category", b => { b.HasOne("Commerce.Domain.Entities.Category", "ParentCategory") .WithMany("ChildCategories") .HasForeignKey("ParentCategoryId"); b.Navigation("ParentCategory"); }); modelBuilder.Entity("Commerce.Domain.Entities.Product", b => { b.HasOne("Commerce.Domain.Entities.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Commerce.Domain.Entities.Product", null) .WithMany("ChildProducts") .HasForeignKey("ProductId"); b.Navigation("Category"); }); modelBuilder.Entity("Commerce.Domain.Entities.Category", b => { b.Navigation("ChildCategories"); }); modelBuilder.Entity("Commerce.Domain.Entities.Product", b => { b.Navigation("ChildProducts"); }); #pragma warning restore 612, 618 } } }