// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using SushiBarDatabaseImplement; #nullable disable namespace SushiBarDatabaseImplement.Migrations { [DbContext(typeof(SushiBarDatabase))] partial class SushiBarDatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "8.0.2") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("SushiBarDatabaseImplement.Models.Component", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ComponentName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Cost") .HasColumnType("float"); b.HasKey("Id"); b.ToTable("Components"); }); modelBuilder.Entity("SushiBarDatabaseImplement.Models.Order", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Count") .HasColumnType("int"); b.Property("DateCreate") .HasColumnType("datetime2"); b.Property("DateImplement") .HasColumnType("datetime2"); b.Property("Status") .HasColumnType("int"); b.Property("Sum") .HasColumnType("float"); b.Property("SushiId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("SushiId"); b.ToTable("Orders"); }); modelBuilder.Entity("SushiBarDatabaseImplement.Models.Shop", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Address") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("DateOpening") .HasColumnType("datetime2"); b.Property("MaxCountSushis") .HasColumnType("int"); b.Property("ShopName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Shops"); }); modelBuilder.Entity("SushiBarDatabaseImplement.Models.ShopSushi", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Count") .HasColumnType("int"); b.Property("ShopId") .HasColumnType("int"); b.Property("SushiId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ShopId"); b.HasIndex("SushiId"); b.ToTable("ShopSushis"); }); modelBuilder.Entity("SushiBarDatabaseImplement.Models.Sushi", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Price") .HasColumnType("float"); b.Property("SushiName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Sushis"); }); modelBuilder.Entity("SushiBarDatabaseImplement.Models.SushiComponent", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ComponentId") .HasColumnType("int"); b.Property("Count") .HasColumnType("int"); b.Property("SushiId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ComponentId"); b.HasIndex("SushiId"); b.ToTable("SushiComponents"); }); modelBuilder.Entity("SushiBarDatabaseImplement.Models.Order", b => { b.HasOne("SushiBarDatabaseImplement.Models.Sushi", null) .WithMany("Orders") .HasForeignKey("SushiId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("SushiBarDatabaseImplement.Models.ShopSushi", b => { b.HasOne("SushiBarDatabaseImplement.Models.Shop", "Shop") .WithMany("Sushis") .HasForeignKey("ShopId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("SushiBarDatabaseImplement.Models.Sushi", "Sushi") .WithMany() .HasForeignKey("SushiId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Shop"); b.Navigation("Sushi"); }); modelBuilder.Entity("SushiBarDatabaseImplement.Models.SushiComponent", b => { b.HasOne("SushiBarDatabaseImplement.Models.Component", "Component") .WithMany("SushiComponents") .HasForeignKey("ComponentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("SushiBarDatabaseImplement.Models.Sushi", "Sushi") .WithMany("Components") .HasForeignKey("SushiId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Component"); b.Navigation("Sushi"); }); modelBuilder.Entity("SushiBarDatabaseImplement.Models.Component", b => { b.Navigation("SushiComponents"); }); modelBuilder.Entity("SushiBarDatabaseImplement.Models.Shop", b => { b.Navigation("Sushis"); }); modelBuilder.Entity("SushiBarDatabaseImplement.Models.Sushi", b => { b.Navigation("Components"); b.Navigation("Orders"); }); #pragma warning restore 612, 618 } } }