// using System; using ElectronicsShopDataBaseImplement; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace ElectronicsShopDataBaseImplement.Migrations { [DbContext(typeof(Database))] partial class DatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "8.0.4") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("ElectronicsShopDataBaseImplement.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("ElectronicsShopDataBaseImplement.Models.CostItem", b => { b.Property("ID") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID")); b.Property("EmployeeID") .HasColumnType("int"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Price") .HasColumnType("float"); b.HasKey("ID"); b.ToTable("CostItems"); }); modelBuilder.Entity("ElectronicsShopDataBaseImplement.Models.Employee", b => { b.Property("ID") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID")); b.Property("EmployeeFIO") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Login") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Password") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("ID"); b.ToTable("Employees"); }); modelBuilder.Entity("ElectronicsShopDataBaseImplement.Models.Order", b => { b.Property("ID") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID")); b.Property("ClientID") .HasColumnType("int"); b.Property("DateCreate") .HasColumnType("datetime2"); b.Property("EmployeeID") .HasColumnType("int"); b.Property("Sum") .HasColumnType("float"); b.HasKey("ID"); b.ToTable("Orders"); }); modelBuilder.Entity("ElectronicsShopDataBaseImplement.Models.OrderProduct", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Count") .HasColumnType("int"); b.Property("OrdersID") .HasColumnType("int"); b.Property("ProductID") .HasColumnType("int"); b.Property("_orderID") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ProductID"); b.HasIndex("_orderID"); b.ToTable("OrderProducts"); }); modelBuilder.Entity("ElectronicsShopDataBaseImplement.Models.Product", b => { b.Property("ID") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ID")); b.Property("CostItemID") .HasColumnType("int"); b.Property("Price") .HasColumnType("float"); b.Property("ProductName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("ID"); b.ToTable("Products"); }); modelBuilder.Entity("ElectronicsShopDataBaseImplement.Models.OrderProduct", b => { b.HasOne("ElectronicsShopDataBaseImplement.Models.Product", "_product") .WithMany() .HasForeignKey("ProductID") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("ElectronicsShopDataBaseImplement.Models.Order", "_order") .WithMany("Products") .HasForeignKey("_orderID") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("_order"); b.Navigation("_product"); }); modelBuilder.Entity("ElectronicsShopDataBaseImplement.Models.Order", b => { b.Navigation("Products"); }); #pragma warning restore 612, 618 } } }