// 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.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.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", null) .WithMany("Orders") .HasForeignKey("ClientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("SushiBarDatabaseImplement.Models.Sushi", null) .WithMany("Orders") .HasForeignKey("SushiId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); 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.Sushi", b => { b.Navigation("Components"); b.Navigation("Orders"); }); #pragma warning restore 612, 618 } } }