// using System; using System.Collections.Generic; using System.Text.Json; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Nashel.Modules.Catalog.Infrastructure.Persistence; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace Nashel.Modules.Catalog.Infrastructure.Persistence.Migrations { [DbContext(typeof(CatalogDbContext))] partial class CatalogDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "10.0.2") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "postgis"); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Nashel.Modules.Catalog.Domain.Aggregates.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AttributeSchema") .HasColumnType("jsonb"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("ParentId") .HasColumnType("uuid"); b.Property("Slug") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("ParentId"); b.HasIndex("Slug") .IsUnique(); b.ToTable("Categories", "catalog"); }); modelBuilder.Entity("Nashel.Modules.Catalog.Domain.Aggregates.Offer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Attributes") .HasColumnType("jsonb"); b.Property("CategoryId") .HasColumnType("uuid"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("Description") .HasColumnType("text"); b.PrimitiveCollection>("Images") .IsRequired() .HasColumnType("text[]"); b.Property("IsActive") .HasColumnType("boolean"); b.Property("IsDeleted") .HasColumnType("boolean"); b.Property("PerformerId") .HasColumnType("uuid"); b.Property("Title") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("Attributes"); NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("Attributes"), "gin"); b.ToTable("Offers", "catalog"); }); modelBuilder.Entity("Nashel.Modules.Catalog.Domain.Aggregates.Category", b => { b.HasOne("Nashel.Modules.Catalog.Domain.Aggregates.Category", null) .WithMany() .HasForeignKey("ParentId") .OnDelete(DeleteBehavior.Restrict); }); modelBuilder.Entity("Nashel.Modules.Catalog.Domain.Aggregates.Offer", b => { b.OwnsOne("Nashel.Modules.Catalog.Domain.ValueObjects.Price", "Price", b1 => { b1.Property("OfferId") .HasColumnType("uuid"); b1.Property("Amount") .HasColumnType("numeric") .HasColumnName("PriceAmount"); b1.Property("Currency") .IsRequired() .HasMaxLength(3) .HasColumnType("character varying(3)") .HasColumnName("PriceCurrency"); b1.Property("Type") .HasColumnType("integer") .HasColumnName("PriceType"); b1.HasKey("OfferId"); b1.ToTable("Offers", "catalog"); b1.WithOwner() .HasForeignKey("OfferId"); }); b.Navigation("Price") .IsRequired(); }); #pragma warning restore 612, 618 } } }