// using System; using AccountingWarehouseProductsDatabaseImplement; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace AccountingWarehouseProductsDatabaseImplement.Migrations { [DbContext(typeof(AccountingWarehouseProductsDatabase))] partial class AccountingWarehouseProductsDatabaseModelSnapshot : 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("AccountingWarehouseProductsDatabaseImplement.Models.Order", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Count") .HasColumnType("int"); b.Property("DateImplement") .HasColumnType("datetime2"); b.Property("DateofOrder") .HasColumnType("datetime2"); b.Property("ProductId") .HasColumnType("int"); b.Property("ProductName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Status") .HasColumnType("int"); b.Property("Sum") .HasColumnType("float"); b.Property("SupplierId") .HasColumnType("int"); b.Property("SupplierName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("ProductId"); b.ToTable("Orders"); }); modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.OrderProduct", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Count") .HasColumnType("int"); b.Property("OrderId") .HasColumnType("int"); b.Property("ProductId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("OrderId"); b.HasIndex("ProductId"); b.ToTable("OrderProduct"); }); modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Category") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Cost") .HasColumnType("float"); b.Property("DateofFabrication") .HasColumnType("datetime2"); b.Property("ProductName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ValidUntil") .IsRequired() .HasColumnType("datetime2"); b.HasKey("Id"); b.ToTable("Products"); }); modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Shipment", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Count") .HasColumnType("int"); b.Property("OrderId") .HasColumnType("int"); b.Property("Recipient") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ShipmentDate") .IsRequired() .HasColumnType("datetime2"); b.HasKey("Id"); b.ToTable("Shipments"); }); modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Stand", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Count") .HasColumnType("int"); b.Property("DeliveryDate") .HasColumnType("datetime2"); b.Property("ProductId") .HasColumnType("int"); b.Property("StandName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("SupplierId") .HasColumnType("int"); b.HasKey("Id"); b.ToTable("Stands"); }); modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Supplier", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ContactPerson") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Phone") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("SupplierName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Suppliers"); }); modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Warehouse", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Address") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Capacity") .HasColumnType("int"); b.Property("WarehouseName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Warehouses"); }); modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.WarehouseProduct", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Count") .HasColumnType("int"); b.Property("ProductId") .HasColumnType("int"); b.Property("WarehouseId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ProductId"); b.HasIndex("WarehouseId"); b.ToTable("WarehouseProduct"); }); modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Order", b => { b.HasOne("AccountingWarehouseProductsDatabaseImplement.Models.Product", "Product") .WithMany("Orders") .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Product"); }); modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.OrderProduct", b => { b.HasOne("AccountingWarehouseProductsDatabaseImplement.Models.Order", "Order") .WithMany("Products") .HasForeignKey("OrderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("AccountingWarehouseProductsDatabaseImplement.Models.Product", "Product") .WithMany("OrderProduct") .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Order"); b.Navigation("Product"); }); modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.WarehouseProduct", b => { b.HasOne("AccountingWarehouseProductsDatabaseImplement.Models.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("AccountingWarehouseProductsDatabaseImplement.Models.Warehouse", "Warehouse") .WithMany("Products") .HasForeignKey("WarehouseId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Product"); b.Navigation("Warehouse"); }); modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Order", b => { b.Navigation("Products"); }); modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Product", b => { b.Navigation("OrderProduct"); b.Navigation("Orders"); }); modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Warehouse", b => { b.Navigation("Products"); }); #pragma warning restore 612, 618 } } }