// 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", "7.0.17") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("SushiBarDatabaseImplement.Models.Client", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ClientFIO") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Email") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Password") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Clients"); }); 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("ClientId") .HasColumnType("int"); 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("ClientId"); 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("Adress") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("OpeningDate") .HasColumnType("datetime2"); b.Property("ShopName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("SushiMaxCount") .HasColumnType("int"); b.HasKey("Id"); b.ToTable("Shops"); }); modelBuilder.Entity("SushiBarDatabaseImplement.Models.ShopSushis", 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.Client", "Client") .WithMany("Orders") .HasForeignKey("ClientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("SushiBarDatabaseImplement.Models.Sushi", "Sushi") .WithMany("Orders") .HasForeignKey("SushiId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Client"); b.Navigation("Sushi"); }); modelBuilder.Entity("SushiBarDatabaseImplement.Models.ShopSushis", 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.Client", b => { b.Navigation("Orders"); }); 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 } } }