326 lines
11 KiB
C#
326 lines
11 KiB
C#
// <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"));
|
|
|
|
b.Property<int>("Count")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime?>("DateImplement")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<DateTime?>("DateofOrder")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int>("ProductId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("ProductName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<double>("Sum")
|
|
.HasColumnType("float");
|
|
|
|
b.Property<int>("SupplierId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("SupplierName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
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");
|
|
|
|
b.ToTable("OrderProduct");
|
|
});
|
|
|
|
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");
|
|
|
|
b.Property<DateTime>("DateofFabrication")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("ProductName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("ValidUntil")
|
|
.IsRequired()
|
|
.HasColumnType("datetime2");
|
|
|
|
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)");
|
|
|
|
b.Property<DateTime?>("ShipmentDate")
|
|
.IsRequired()
|
|
.HasColumnType("datetime2");
|
|
|
|
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");
|
|
|
|
b.Property<DateTime?>("DeliveryDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
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");
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|