File: Migrations\CatalogDbContextModelSnapshot.cs
Web Access
Project: src\playground\TestShop\CatalogDb\CatalogDb.csproj (CatalogDb)
// <auto-generated />
using CatalogDb;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
 
#nullable disable
 
namespace CatalogDb.Migrations
{
    [DbContext(typeof(CatalogDbContext))]
    partial class CatalogDbContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "8.0.0-preview.3.23174.2")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);
 
            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
 
            modelBuilder.HasSequence("catalog_brand_hilo")
                .IncrementsBy(10);
 
            modelBuilder.HasSequence("catalog_hilo")
                .IncrementsBy(10);
 
            modelBuilder.HasSequence("catalog_type_hilo")
                .IncrementsBy(10);
 
            modelBuilder.Entity("CatalogDb.CatalogBrand", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");
 
                    NpgsqlPropertyBuilderExtensions.UseHiLo(b.Property<int>("Id"), "catalog_brand_hilo");
 
                    b.Property<string>("Brand")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("character varying(100)");
 
                    b.HasKey("Id");
 
                    b.ToTable("CatalogBrand", (string)null);
                });
 
            modelBuilder.Entity("CatalogDb.CatalogItem", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");
 
                    NpgsqlPropertyBuilderExtensions.UseHiLo(b.Property<int>("Id"), "catalog_hilo");
 
                    b.Property<int>("AvailableStock")
                        .HasColumnType("integer");
 
                    b.Property<int>("CatalogBrandId")
                        .HasColumnType("integer");
 
                    b.Property<int>("CatalogTypeId")
                        .HasColumnType("integer");
 
                    b.Property<string>("Description")
                        .HasColumnType("text");
 
                    b.Property<int>("MaxStockThreshold")
                        .HasColumnType("integer");
 
                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(50)
                        .HasColumnType("character varying(50)");
 
                    b.Property<bool>("OnReorder")
                        .HasColumnType("boolean");
 
                    b.Property<string>("PictureFileName")
                        .HasColumnType("text");
 
                    b.Property<decimal>("Price")
                        .HasColumnType("numeric");
 
                    b.Property<int>("RestockThreshold")
                        .HasColumnType("integer");
 
                    b.HasKey("Id");
 
                    b.HasIndex("CatalogBrandId");
 
                    b.HasIndex("CatalogTypeId");
 
                    b.ToTable("Catalog", (string)null);
                });
 
            modelBuilder.Entity("CatalogDb.CatalogType", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer");
 
                    NpgsqlPropertyBuilderExtensions.UseHiLo(b.Property<int>("Id"), "catalog_type_hilo");
 
                    b.Property<string>("Type")
                        .IsRequired()
                        .HasMaxLength(100)
                        .HasColumnType("character varying(100)");
 
                    b.HasKey("Id");
 
                    b.ToTable("CatalogType", (string)null);
                });
 
            modelBuilder.Entity("CatalogDb.CatalogItem", b =>
                {
                    b.HasOne("CatalogDb.CatalogBrand", "CatalogBrand")
                        .WithMany()
                        .HasForeignKey("CatalogBrandId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
 
                    b.HasOne("CatalogDb.CatalogType", "CatalogType")
                        .WithMany()
                        .HasForeignKey("CatalogTypeId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
 
                    b.Navigation("CatalogBrand");
 
                    b.Navigation("CatalogType");
                });
#pragma warning restore 612, 618
        }
    }
}