2024-04-21 19:17:40 +04:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
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<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
2024-05-01 22:21:11 +04:00
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime?>("DateImplement")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
2024-04-21 19:17:40 +04:00
|
|
|
|
b.Property<DateTime?>("DateofOrder")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
2024-05-01 22:21:11 +04:00
|
|
|
|
b.Property<int>("ProductId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ProductName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
2024-04-21 19:17:40 +04:00
|
|
|
|
b.Property<int>("Status")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
2024-05-01 22:21:11 +04:00
|
|
|
|
b.Property<double>("Sum")
|
|
|
|
|
.HasColumnType("float");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("SupplierId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
2024-04-21 19:17:40 +04:00
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2024-05-01 22:21:11 +04:00
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
|
|
2024-04-21 19:17:40 +04:00
|
|
|
|
b.ToTable("Orders");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.OrderProduct", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("OrderId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("ProductId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("OrderId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
|
|
2024-05-01 22:21:11 +04:00
|
|
|
|
b.ToTable("OrderProduct");
|
2024-04-21 19:17:40 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Product", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Category")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Cost")
|
|
|
|
|
.HasColumnType("float");
|
|
|
|
|
|
2024-05-01 22:21:11 +04:00
|
|
|
|
b.Property<string>("DateofFabrication")
|
2024-04-21 19:17:40 +04:00
|
|
|
|
.IsRequired()
|
2024-05-01 22:21:11 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-21 19:17:40 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("ProductName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
2024-05-01 22:21:11 +04:00
|
|
|
|
b.Property<string>("ValidUntil")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
2024-04-21 19:17:40 +04:00
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Products");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Shipment", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("OrderId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Recipient")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
2024-05-01 22:21:11 +04:00
|
|
|
|
b.Property<string>("ShipmentDate")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-21 19:17:40 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Shipments");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Stand", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
2024-05-01 22:21:11 +04:00
|
|
|
|
b.Property<string>("DeliveryDate")
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-21 19:17:40 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("ProductId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("StandName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("SupplierId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Stands");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Supplier", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ContactPerson")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Phone")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("SupplierName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Suppliers");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Warehouse", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Address")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Capacity")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("WarehouseName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Warehouses");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.WarehouseProduct", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("ProductId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("WarehouseId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("WarehouseId");
|
|
|
|
|
|
2024-05-01 22:21:11 +04:00
|
|
|
|
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");
|
2024-04-21 19:17:40 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
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")
|
2024-05-01 22:21:11 +04:00
|
|
|
|
.WithMany("OrderProduct")
|
2024-04-21 19:17:40 +04:00
|
|
|
|
.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");
|
|
|
|
|
});
|
|
|
|
|
|
2024-05-01 22:21:11 +04:00
|
|
|
|
modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Product", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("OrderProduct");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Orders");
|
|
|
|
|
});
|
|
|
|
|
|
2024-04-21 19:17:40 +04:00
|
|
|
|
modelBuilder.Entity("AccountingWarehouseProductsDatabaseImplement.Models.Warehouse", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Products");
|
|
|
|
|
});
|
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|