395 lines
14 KiB
C#
395 lines
14 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using PSTW_CentralSystem.DBContext;
|
|
|
|
#nullable disable
|
|
|
|
namespace PSTW_CentralSystem.Migrations.InventoryDB
|
|
{
|
|
[DbContext(typeof(InventoryDBContext))]
|
|
[Migration("20241206071642_Initiate")]
|
|
partial class Initiate
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "8.0.11")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
|
|
|
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", b =>
|
|
{
|
|
b.Property<int>("ItemID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("ItemID"));
|
|
|
|
b.Property<int>("CompanyId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<float>("ConvertPrice")
|
|
.HasColumnType("float");
|
|
|
|
b.Property<int>("CreatedByUserId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Currency")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<float>("CurrencyRate")
|
|
.HasColumnType("float");
|
|
|
|
b.Property<DateTime?>("DODate")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("DONo")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<int>("DepartmentId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime>("EndWDate")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<DateTime?>("InvoiceDate")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("InvoiceNo")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("ItemLocation")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<int>("ItemStatus")
|
|
.HasColumnType("int")
|
|
.HasComment("1 = In stock; 2 = Item Moving; 3 = Item Out; 4 = Item Broken; 5 = Item Lost; 6 = Item Stolen; 7 = Item Damaged; 8 = Item Discarded; 9 = Item Destroyed; 10 = Item Finished;");
|
|
|
|
b.Property<string>("PONo")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<float>("PriceInRM")
|
|
.HasColumnType("float");
|
|
|
|
b.Property<int>("ProductId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime>("PurchaseDate")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<int>("Quantity")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("SerialNumber")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("Supplier")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("TeamType")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("UniqueID")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<int>("Warranty")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("ItemID");
|
|
|
|
b.HasIndex("CompanyId");
|
|
|
|
b.HasIndex("CreatedByUserId");
|
|
|
|
b.HasIndex("DepartmentId");
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
b.ToTable("Items");
|
|
});
|
|
|
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ManufacturerModel", b =>
|
|
{
|
|
b.Property<int>("ManufacturerId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("ManufacturerId"));
|
|
|
|
b.Property<string>("ManufacturerName")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.HasKey("ManufacturerId");
|
|
|
|
b.ToTable("Manufacturers");
|
|
});
|
|
|
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b =>
|
|
{
|
|
b.Property<int>("ProductId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("ProductId"));
|
|
|
|
b.Property<string>("Category")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("ImageProduct")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<int>("ManufacturerId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("ModelNo")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("ProductName")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<int?>("QuantityProduct")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("ProductId");
|
|
|
|
b.HasIndex("ManufacturerId");
|
|
|
|
b.ToTable("Products");
|
|
});
|
|
|
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.SupplierModel", b =>
|
|
{
|
|
b.Property<int>("SupplierId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("SupplierId"));
|
|
|
|
b.Property<string>("SupplierEmail")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("SupplierGender")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("SupplierName")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("SupplierPhoneNo")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.HasKey("SupplierId");
|
|
|
|
b.ToTable("Suppliers");
|
|
});
|
|
|
|
modelBuilder.Entity("PSTW_CentralSystem.Models.CompanyModel", b =>
|
|
{
|
|
b.Property<int>("CompanyId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("CompanyId"));
|
|
|
|
b.Property<string>("CompanyName")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.HasKey("CompanyId");
|
|
|
|
b.ToTable("CompanyModel");
|
|
});
|
|
|
|
modelBuilder.Entity("PSTW_CentralSystem.Models.DepartmentModel", b =>
|
|
{
|
|
b.Property<int>("DepartmentId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("DepartmentId"));
|
|
|
|
b.Property<int>("CompanyId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("DepartmentCode")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("DepartmentName")
|
|
.IsRequired()
|
|
.HasColumnType("longtext");
|
|
|
|
b.HasKey("DepartmentId");
|
|
|
|
b.HasIndex("CompanyId");
|
|
|
|
b.ToTable("DepartmentModel");
|
|
});
|
|
|
|
modelBuilder.Entity("PSTW_CentralSystem.Models.UserModel", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("AccessFailedCount")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("Email")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<bool>("EmailConfirmed")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<string>("FullName")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<bool>("LockoutEnabled")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("NormalizedEmail")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("NormalizedUserName")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<bool>("PhoneNumberConfirmed")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<string>("SecurityStamp")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<bool>("TwoFactorEnabled")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<string>("UserName")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<int?>("UserInfoStatus")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int?>("departmentId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("departmentId");
|
|
|
|
b.ToTable("UserModel");
|
|
});
|
|
|
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", b =>
|
|
{
|
|
b.HasOne("PSTW_CentralSystem.Models.CompanyModel", "Company")
|
|
.WithMany()
|
|
.HasForeignKey("CompanyId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("PSTW_CentralSystem.Models.UserModel", "CreatedBy")
|
|
.WithMany()
|
|
.HasForeignKey("CreatedByUserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("PSTW_CentralSystem.Models.DepartmentModel", "Department")
|
|
.WithMany()
|
|
.HasForeignKey("DepartmentId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", "Product")
|
|
.WithMany("Items")
|
|
.HasForeignKey("ProductId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Company");
|
|
|
|
b.Navigation("CreatedBy");
|
|
|
|
b.Navigation("Department");
|
|
|
|
b.Navigation("Product");
|
|
});
|
|
|
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b =>
|
|
{
|
|
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ManufacturerModel", "Manufacturer")
|
|
.WithMany()
|
|
.HasForeignKey("ManufacturerId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Manufacturer");
|
|
});
|
|
|
|
modelBuilder.Entity("PSTW_CentralSystem.Models.DepartmentModel", b =>
|
|
{
|
|
b.HasOne("PSTW_CentralSystem.Models.CompanyModel", "Company")
|
|
.WithMany("Departments")
|
|
.HasForeignKey("CompanyId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Company");
|
|
});
|
|
|
|
modelBuilder.Entity("PSTW_CentralSystem.Models.UserModel", b =>
|
|
{
|
|
b.HasOne("PSTW_CentralSystem.Models.DepartmentModel", "Department")
|
|
.WithMany()
|
|
.HasForeignKey("departmentId");
|
|
|
|
b.Navigation("Department");
|
|
});
|
|
|
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b =>
|
|
{
|
|
b.Navigation("Items");
|
|
});
|
|
|
|
modelBuilder.Entity("PSTW_CentralSystem.Models.CompanyModel", b =>
|
|
{
|
|
b.Navigation("Departments");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|