Qr & Movement Display
This commit is contained in:
parent
98161fd740
commit
e64e288eac
@ -624,7 +624,7 @@
|
|||||||
}
|
}
|
||||||
else if (movement.lastStation == null || movement.toStation == null) {
|
else if (movement.lastStation == null || movement.toStation == null) {
|
||||||
|
|
||||||
let station = "Self";
|
let station = "Self Assigned";
|
||||||
let itemId = movement.uniqueID;
|
let itemId = movement.uniqueID;
|
||||||
|
|
||||||
if (!grouped[station]) {
|
if (!grouped[station]) {
|
||||||
|
|||||||
@ -401,11 +401,10 @@
|
|||||||
error: "",
|
error: "",
|
||||||
selectedConstraints: {
|
selectedConstraints: {
|
||||||
video: {
|
video: {
|
||||||
facingMode: "environment", // Kamera belakang
|
facingMode: 'user', // Kamera belakang
|
||||||
width: { ideal: 1920 }, // Resolusi tinggi
|
width: { ideal: 1920 },
|
||||||
height: { ideal: 1080 },
|
height: { ideal: 1080 },
|
||||||
focusMode: "continuous", // Auto-focus
|
focusMode: "continuous", // Auto-focus
|
||||||
zoom: 2.0
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trackFunctionSelected: { text: 'outline', value: null },
|
trackFunctionSelected: { text: 'outline', value: null },
|
||||||
@ -731,7 +730,8 @@
|
|||||||
}
|
}
|
||||||
this.error = message;
|
this.error = message;
|
||||||
},
|
},
|
||||||
//Setting Camera
|
|
||||||
|
//Setting Camera to know that camera are turn on or not
|
||||||
async onCameraReady() {
|
async onCameraReady() {
|
||||||
this.enableAutoFocus();
|
this.enableAutoFocus();
|
||||||
},
|
},
|
||||||
@ -750,16 +750,13 @@
|
|||||||
} else {
|
} else {
|
||||||
this.error = "No camera detected.";
|
this.error = "No camera detected.";
|
||||||
}
|
}
|
||||||
|
const stream = await navigator.mediaDevices.getUserMedia({ video: { deviceId: { exact: "aad01180cfed01791141d7d234f1b0ff4330ff42ff1076e33d92328c859107cf" } } });
|
||||||
|
|
||||||
const stream = await navigator.mediaDevices.getUserMedia({ video: true });
|
|
||||||
const track = stream.getVideoTracks()[0];
|
const track = stream.getVideoTracks()[0];
|
||||||
const capabilities = track.getCapabilities();
|
const capabilities = track.getCapabilities();
|
||||||
|
|
||||||
if(capabilities.focusMode) {
|
track.applyConstraints({
|
||||||
await track.applyConstraints({ focusMode: "continuous" }); // Auto-focus
|
advanced: [{width
|
||||||
}
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
953
Migrations/20250106062312_Initiate.Designer.cs
generated
953
Migrations/20250106062312_Initiate.Designer.cs
generated
@ -1,953 +0,0 @@
|
|||||||
// <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
|
|
||||||
{
|
|
||||||
[DbContext(typeof(CentralSystemContext))]
|
|
||||||
[Migration("20250106062312_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("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType")
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue")
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
b.Property<int>("RoleId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoleClaims", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("ClaimType")
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
b.Property<string>("ClaimValue")
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
b.Property<int>("UserId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserClaims", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<string>("LoginProvider")
|
|
||||||
.HasColumnType("varchar(255)");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderKey")
|
|
||||||
.HasColumnType("varchar(255)");
|
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName")
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
b.Property<int>("UserId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("LoginProvider", "ProviderKey");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserLogins", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("UserId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("RoleId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "RoleId");
|
|
||||||
|
|
||||||
b.HasIndex("RoleId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserRoles", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
UserId = 1,
|
|
||||||
RoleId = 1
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
UserId = 2,
|
|
||||||
RoleId = 2
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("UserId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("LoginProvider")
|
|
||||||
.HasColumnType("varchar(255)");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasColumnType("varchar(255)");
|
|
||||||
|
|
||||||
b.Property<string>("Value")
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
b.HasKey("UserId", "LoginProvider", "Name");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUserTokens", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.InventoryMasterModel", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("StoreId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("UserId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("StoreId");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("InventoryMasters");
|
|
||||||
});
|
|
||||||
|
|
||||||
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<float>("DefaultPrice")
|
|
||||||
.HasColumnType("float");
|
|
||||||
|
|
||||||
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<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<int?>("MovementId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("PONo")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
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("MovementId")
|
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.HasIndex("ProductId");
|
|
||||||
|
|
||||||
b.ToTable("Items");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemMovementModel", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Action")
|
|
||||||
.HasColumnType("longtext")
|
|
||||||
.HasComment("Register, StockIn, Stock Out");
|
|
||||||
|
|
||||||
b.Property<string>("ConsignmentNote")
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
b.Property<DateTime>("Date")
|
|
||||||
.HasColumnType("datetime(6)");
|
|
||||||
|
|
||||||
b.Property<int>("ItemId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int?>("LastStation")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int?>("LastStore")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int?>("LastUser")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("LatestStatus")
|
|
||||||
.HasColumnType("longtext")
|
|
||||||
.HasComment("Repair, Calibration, Faulty, Ready To Deploy, On Delivery");
|
|
||||||
|
|
||||||
b.Property<bool>("MovementComplete")
|
|
||||||
.HasColumnType("tinyint(1)");
|
|
||||||
|
|
||||||
b.Property<int?>("Quantity")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Remark")
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
b.Property<string>("ToOther")
|
|
||||||
.HasColumnType("longtext")
|
|
||||||
.HasComment("Repair, Calibration, Faulty, Ready To Deploy, On Delivery");
|
|
||||||
|
|
||||||
b.Property<int?>("ToStation")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int?>("ToStore")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int?>("ToUser")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("LastStation");
|
|
||||||
|
|
||||||
b.HasIndex("LastStore");
|
|
||||||
|
|
||||||
b.HasIndex("LastUser");
|
|
||||||
|
|
||||||
b.HasIndex("ToStation");
|
|
||||||
|
|
||||||
b.HasIndex("ToStore");
|
|
||||||
|
|
||||||
b.HasIndex("ToUser");
|
|
||||||
|
|
||||||
b.ToTable("ItemMovements");
|
|
||||||
});
|
|
||||||
|
|
||||||
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.StationModel", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("StationId")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("StationId"));
|
|
||||||
|
|
||||||
b.Property<int>("DepartmentId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("StationName")
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
b.Property<int>("StationPicID")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("StationId");
|
|
||||||
|
|
||||||
b.HasIndex("DepartmentId");
|
|
||||||
|
|
||||||
b.HasIndex("StationPicID");
|
|
||||||
|
|
||||||
b.ToTable("Stations");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.StoreModel", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("CompanyId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("StoreName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("CompanyId");
|
|
||||||
|
|
||||||
b.ToTable("Stores");
|
|
||||||
});
|
|
||||||
|
|
||||||
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("Companies");
|
|
||||||
});
|
|
||||||
|
|
||||||
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("Departments");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Models.ModuleSettingModel", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("SettingId")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("SettingId"));
|
|
||||||
|
|
||||||
b.Property<string>("AllowedUserType")
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
b.Property<string>("MethodAllowedUserType")
|
|
||||||
.HasColumnType("json");
|
|
||||||
|
|
||||||
b.Property<string>("ModuleName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(50)
|
|
||||||
.HasColumnType("varchar(50)");
|
|
||||||
|
|
||||||
b.Property<int>("ModuleStatus")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("SettingId");
|
|
||||||
|
|
||||||
b.ToTable("ModuleSettings");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Models.RoleModel", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("ConcurrencyStamp")
|
|
||||||
.IsConcurrencyToken()
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.HasMaxLength(256)
|
|
||||||
.HasColumnType("varchar(256)");
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedName")
|
|
||||||
.HasMaxLength(256)
|
|
||||||
.HasColumnType("varchar(256)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedName")
|
|
||||||
.IsUnique()
|
|
||||||
.HasDatabaseName("RoleNameIndex");
|
|
||||||
|
|
||||||
b.ToTable("AspNetRoles", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
Description = "Can access all pages",
|
|
||||||
Name = "SuperAdmin",
|
|
||||||
NormalizedName = "SUPERADMIN"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 2,
|
|
||||||
Description = "Can access some admin pages",
|
|
||||||
Name = "SystemAdmin",
|
|
||||||
NormalizedName = "SYSTEMADMIN"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 3,
|
|
||||||
Description = "Can access operation pages",
|
|
||||||
Name = "Engineer",
|
|
||||||
NormalizedName = "ENGINEER"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 4,
|
|
||||||
Description = "Can access data viewer pages",
|
|
||||||
Name = "Observer",
|
|
||||||
NormalizedName = "OBSERVER"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 5,
|
|
||||||
Description = "Handle inventory module",
|
|
||||||
Name = "Inventory Master",
|
|
||||||
NormalizedName = "INVENTORY MASTER"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 6,
|
|
||||||
Description = "Involve in inventory transaction",
|
|
||||||
Name = "Finance",
|
|
||||||
NormalizedName = "FINANCE"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
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")
|
|
||||||
.IsConcurrencyToken()
|
|
||||||
.HasColumnType("longtext");
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.HasMaxLength(256)
|
|
||||||
.HasColumnType("varchar(256)");
|
|
||||||
|
|
||||||
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")
|
|
||||||
.HasMaxLength(256)
|
|
||||||
.HasColumnType("varchar(256)");
|
|
||||||
|
|
||||||
b.Property<string>("NormalizedUserName")
|
|
||||||
.HasMaxLength(256)
|
|
||||||
.HasColumnType("varchar(256)");
|
|
||||||
|
|
||||||
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<int?>("UserInfoStatus")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("UserName")
|
|
||||||
.HasMaxLength(256)
|
|
||||||
.HasColumnType("varchar(256)");
|
|
||||||
|
|
||||||
b.Property<int?>("departmentId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedEmail")
|
|
||||||
.HasDatabaseName("EmailIndex");
|
|
||||||
|
|
||||||
b.HasIndex("NormalizedUserName")
|
|
||||||
.IsUnique()
|
|
||||||
.HasDatabaseName("UserNameIndex");
|
|
||||||
|
|
||||||
b.HasIndex("departmentId");
|
|
||||||
|
|
||||||
b.ToTable("AspNetUsers", (string)null);
|
|
||||||
|
|
||||||
b.HasData(
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 1,
|
|
||||||
AccessFailedCount = 0,
|
|
||||||
ConcurrencyStamp = "4c8e81ae-2e43-4f98-82a0-4d7c4aa6d011",
|
|
||||||
Email = "admin@pstw.com.my",
|
|
||||||
EmailConfirmed = true,
|
|
||||||
FullName = "MAAdmin",
|
|
||||||
LockoutEnabled = false,
|
|
||||||
NormalizedEmail = "ADMIN@PSTW.COM.MY",
|
|
||||||
NormalizedUserName = "ADMIN@PSTW.COM.MY",
|
|
||||||
PasswordHash = "AQAAAAIAAYagAAAAEKr0d9Fe168hXvdX6+oJvbfo2QHFsp8i/EQjhLbkWRn/yvKImJa6XzZ5KJ6qohTE1w==",
|
|
||||||
PhoneNumberConfirmed = false,
|
|
||||||
SecurityStamp = "2219ec34-d4a0-496b-a7d7-e6c5d7b2a222",
|
|
||||||
TwoFactorEnabled = false,
|
|
||||||
UserInfoStatus = 1,
|
|
||||||
UserName = "admin@pstw.com.my"
|
|
||||||
},
|
|
||||||
new
|
|
||||||
{
|
|
||||||
Id = 2,
|
|
||||||
AccessFailedCount = 0,
|
|
||||||
ConcurrencyStamp = "bcc1500e-9ae2-4704-9997-dbe646d2fa7a",
|
|
||||||
Email = "sysadmin@pstw.com.my",
|
|
||||||
EmailConfirmed = true,
|
|
||||||
FullName = "SysAdmin",
|
|
||||||
LockoutEnabled = false,
|
|
||||||
NormalizedEmail = "SYSADMIN@PSTW.COM.MY",
|
|
||||||
NormalizedUserName = "SYSADMIN@PSTW.COM.MY",
|
|
||||||
PasswordHash = "AQAAAAIAAYagAAAAEE3CUAWzIeL592V5xPyAD5ciHe8OGtvbNHhU6UNafDMT/+0R77o6UCDj/K8wc0j0Xw==",
|
|
||||||
PhoneNumberConfirmed = false,
|
|
||||||
SecurityStamp = "7c582e0d-8237-4605-8fec-449bbe78f6c9",
|
|
||||||
TwoFactorEnabled = false,
|
|
||||||
UserInfoStatus = 1,
|
|
||||||
UserName = "sysadmin@pstw.com.my"
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("PSTW_CentralSystem.Models.RoleModel", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("RoleId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("PSTW_CentralSystem.Models.UserModel", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("PSTW_CentralSystem.Models.UserModel", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("PSTW_CentralSystem.Models.RoleModel", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("RoleId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Models.UserModel", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("PSTW_CentralSystem.Models.UserModel", null)
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.InventoryMasterModel", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.StoreModel", "Store")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("StoreId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Models.UserModel", "User")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Store");
|
|
||||||
|
|
||||||
b.Navigation("User");
|
|
||||||
});
|
|
||||||
|
|
||||||
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.ItemMovementModel", "Movement")
|
|
||||||
.WithOne("Item")
|
|
||||||
.HasForeignKey("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", "MovementId");
|
|
||||||
|
|
||||||
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("Movement");
|
|
||||||
|
|
||||||
b.Navigation("Product");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemMovementModel", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", "FromStation")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("LastStation");
|
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.StoreModel", "FromStore")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("LastStore");
|
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Models.UserModel", "FromUser")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("LastUser");
|
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", "NextStation")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("ToStation");
|
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.StoreModel", "NextStore")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("ToStore");
|
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Models.UserModel", "NextUser")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("ToUser");
|
|
||||||
|
|
||||||
b.Navigation("FromStation");
|
|
||||||
|
|
||||||
b.Navigation("FromStore");
|
|
||||||
|
|
||||||
b.Navigation("FromUser");
|
|
||||||
|
|
||||||
b.Navigation("NextStation");
|
|
||||||
|
|
||||||
b.Navigation("NextStore");
|
|
||||||
|
|
||||||
b.Navigation("NextUser");
|
|
||||||
});
|
|
||||||
|
|
||||||
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.Areas.Inventory.Models.StationModel", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("PSTW_CentralSystem.Models.DepartmentModel", "Department")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("DepartmentId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Models.UserModel", "StationPic")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("StationPicID")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Department");
|
|
||||||
|
|
||||||
b.Navigation("StationPic");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.StoreModel", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("PSTW_CentralSystem.Models.CompanyModel", "Company")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("CompanyId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Company");
|
|
||||||
});
|
|
||||||
|
|
||||||
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.ItemMovementModel", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Item");
|
|
||||||
});
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,179 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace PSTW_CentralSystem.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class UpdateDatabaseChanges : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "SupplierName",
|
|
||||||
table: "Suppliers",
|
|
||||||
newName: "SupplierCompName");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "SupplierGender",
|
|
||||||
table: "Suppliers",
|
|
||||||
newName: "SupplierAddress");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "SupplierPhoneNo",
|
|
||||||
table: "Suppliers",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "SupplierEmail",
|
|
||||||
table: "Suppliers",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext")
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "SupplierPIC",
|
|
||||||
table: "Suppliers",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "ProductShortName",
|
|
||||||
table: "Products",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.AddColumn<string>(
|
|
||||||
name: "PartNumber",
|
|
||||||
table: "Items",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Request",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
requestId = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
||||||
remark = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
status = table.Column<string>(type: "longtext", nullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
||||||
requestDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
||||||
approvalDate = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Request", x => x.requestId);
|
|
||||||
})
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "AspNetUsers",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 1,
|
|
||||||
columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" },
|
|
||||||
values: new object[] { "6b8e8dbd-4380-4e8c-aa0b-1c1fffc3059c", "AQAAAAIAAYagAAAAEFKtr2LZjKgfLzY44m8cVW4qpdwci45lnh/t3ioymIh6Ib6c85ne3QGfnUAyERwMWg==", "79e606c8-032b-426b-8fb2-7727b93823eb" });
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "AspNetUsers",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 2,
|
|
||||||
columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" },
|
|
||||||
values: new object[] { "8bf46c63-d7df-4ac5-bab2-fc15fe881302", "AQAAAAIAAYagAAAAEB/4JzIPKQK76gM4+Ddc948BoBumC8oa2Ya4odgM4r6P+LNaWRaLOaFG4bp0Iya9Sg==", "5ac5ec31-c25f-4a7a-8057-664ecdf76108" });
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Request");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "SupplierPIC",
|
|
||||||
table: "Suppliers");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ProductShortName",
|
|
||||||
table: "Products");
|
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "PartNumber",
|
|
||||||
table: "Items");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "SupplierCompName",
|
|
||||||
table: "Suppliers",
|
|
||||||
newName: "SupplierName");
|
|
||||||
|
|
||||||
migrationBuilder.RenameColumn(
|
|
||||||
name: "SupplierAddress",
|
|
||||||
table: "Suppliers",
|
|
||||||
newName: "SupplierGender");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Suppliers",
|
|
||||||
keyColumn: "SupplierPhoneNo",
|
|
||||||
keyValue: null,
|
|
||||||
column: "SupplierPhoneNo",
|
|
||||||
value: "");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "SupplierPhoneNo",
|
|
||||||
table: "Suppliers",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext",
|
|
||||||
oldNullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "Suppliers",
|
|
||||||
keyColumn: "SupplierEmail",
|
|
||||||
keyValue: null,
|
|
||||||
column: "SupplierEmail",
|
|
||||||
value: "");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "SupplierEmail",
|
|
||||||
table: "Suppliers",
|
|
||||||
type: "longtext",
|
|
||||||
nullable: false,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "longtext",
|
|
||||||
oldNullable: true)
|
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
|
||||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "AspNetUsers",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 1,
|
|
||||||
columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" },
|
|
||||||
values: new object[] { "4c8e81ae-2e43-4f98-82a0-4d7c4aa6d011", "AQAAAAIAAYagAAAAEKr0d9Fe168hXvdX6+oJvbfo2QHFsp8i/EQjhLbkWRn/yvKImJa6XzZ5KJ6qohTE1w==", "2219ec34-d4a0-496b-a7d7-e6c5d7b2a222" });
|
|
||||||
|
|
||||||
migrationBuilder.UpdateData(
|
|
||||||
table: "AspNetUsers",
|
|
||||||
keyColumn: "Id",
|
|
||||||
keyValue: 2,
|
|
||||||
columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" },
|
|
||||||
values: new object[] { "bcc1500e-9ae2-4704-9997-dbe646d2fa7a", "AQAAAAIAAYagAAAAEE3CUAWzIeL592V5xPyAD5ciHe8OGtvbNHhU6UNafDMT/+0R77o6UCDj/K8wc0j0Xw==", "7c582e0d-8237-4605-8fec-449bbe78f6c9" });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -12,8 +12,8 @@ using PSTW_CentralSystem.DBContext;
|
|||||||
namespace PSTW_CentralSystem.Migrations
|
namespace PSTW_CentralSystem.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(CentralSystemContext))]
|
[DbContext(typeof(CentralSystemContext))]
|
||||||
[Migration("20250220015910_UpdateDatabaseChanges")]
|
[Migration("20250305032933_UpdateLatest")]
|
||||||
partial class UpdateDatabaseChanges
|
partial class UpdateLatest
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
@ -150,7 +150,8 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.HasKey("StoreId");
|
b.HasKey("StoreId");
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
b.HasIndex("UserId")
|
||||||
|
.IsUnique();
|
||||||
|
|
||||||
b.ToTable("InventoryMasters");
|
b.ToTable("InventoryMasters");
|
||||||
});
|
});
|
||||||
@ -249,8 +250,7 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.HasIndex("DepartmentId");
|
b.HasIndex("DepartmentId");
|
||||||
|
|
||||||
b.HasIndex("MovementId")
|
b.HasIndex("MovementId");
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.HasIndex("ProductId");
|
b.HasIndex("ProductId");
|
||||||
|
|
||||||
@ -275,7 +275,7 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
b.Property<DateTime>("Date")
|
b.Property<DateTime>("Date")
|
||||||
.HasColumnType("datetime(6)");
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
b.Property<int>("ItemId")
|
b.Property<int?>("ItemId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int?>("LastStation")
|
b.Property<int?>("LastStation")
|
||||||
@ -313,8 +313,16 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
b.Property<int?>("ToUser")
|
b.Property<int?>("ToUser")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("receiveDate")
|
||||||
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("sendDate")
|
||||||
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ItemId");
|
||||||
|
|
||||||
b.HasIndex("LastStation");
|
b.HasIndex("LastStation");
|
||||||
|
|
||||||
b.HasIndex("LastStore");
|
b.HasIndex("LastStore");
|
||||||
@ -396,10 +404,31 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("requestId"));
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("requestId"));
|
||||||
|
|
||||||
b.Property<DateTime>("approvalDate")
|
b.Property<string>("Document")
|
||||||
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
|
b.Property<string>("ProductCategory")
|
||||||
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
|
b.Property<int>("ProductId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int?>("RequestQuantity")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int?>("StationId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int>("UserId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("approvalDate")
|
||||||
.HasColumnType("datetime(6)");
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
b.Property<string>("remark")
|
b.Property<string>("remarkMasterInv")
|
||||||
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
|
b.Property<string>("remarkUser")
|
||||||
.HasColumnType("longtext");
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
b.Property<DateTime>("requestDate")
|
b.Property<DateTime>("requestDate")
|
||||||
@ -410,7 +439,13 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.HasKey("requestId");
|
b.HasKey("requestId");
|
||||||
|
|
||||||
b.ToTable("Request");
|
b.HasIndex("ProductId");
|
||||||
|
|
||||||
|
b.HasIndex("StationId");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
b.ToTable("request");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", b =>
|
||||||
@ -722,16 +757,16 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
{
|
{
|
||||||
Id = 1,
|
Id = 1,
|
||||||
AccessFailedCount = 0,
|
AccessFailedCount = 0,
|
||||||
ConcurrencyStamp = "6b8e8dbd-4380-4e8c-aa0b-1c1fffc3059c",
|
ConcurrencyStamp = "402e8e19-59a4-4fae-8ffe-4d935bcb1104",
|
||||||
Email = "admin@pstw.com.my",
|
Email = "admin@pstw.com.my",
|
||||||
EmailConfirmed = true,
|
EmailConfirmed = true,
|
||||||
FullName = "MAAdmin",
|
FullName = "MAAdmin",
|
||||||
LockoutEnabled = false,
|
LockoutEnabled = false,
|
||||||
NormalizedEmail = "ADMIN@PSTW.COM.MY",
|
NormalizedEmail = "ADMIN@PSTW.COM.MY",
|
||||||
NormalizedUserName = "ADMIN@PSTW.COM.MY",
|
NormalizedUserName = "ADMIN@PSTW.COM.MY",
|
||||||
PasswordHash = "AQAAAAIAAYagAAAAEFKtr2LZjKgfLzY44m8cVW4qpdwci45lnh/t3ioymIh6Ib6c85ne3QGfnUAyERwMWg==",
|
PasswordHash = "AQAAAAIAAYagAAAAEM22wL5Kx9mwPIJilJAgzudLHg+HduDhJaq+BjD3jh5bqPzi+OnTzAEN49l1IeBqcw==",
|
||||||
PhoneNumberConfirmed = false,
|
PhoneNumberConfirmed = false,
|
||||||
SecurityStamp = "79e606c8-032b-426b-8fb2-7727b93823eb",
|
SecurityStamp = "4a127c4f-3199-4037-8c02-0a21b750351b",
|
||||||
TwoFactorEnabled = false,
|
TwoFactorEnabled = false,
|
||||||
UserInfoStatus = 1,
|
UserInfoStatus = 1,
|
||||||
UserName = "admin@pstw.com.my"
|
UserName = "admin@pstw.com.my"
|
||||||
@ -740,16 +775,16 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
{
|
{
|
||||||
Id = 2,
|
Id = 2,
|
||||||
AccessFailedCount = 0,
|
AccessFailedCount = 0,
|
||||||
ConcurrencyStamp = "8bf46c63-d7df-4ac5-bab2-fc15fe881302",
|
ConcurrencyStamp = "05ebfe99-3f46-43b8-9aaa-e01c5bb31a86",
|
||||||
Email = "sysadmin@pstw.com.my",
|
Email = "sysadmin@pstw.com.my",
|
||||||
EmailConfirmed = true,
|
EmailConfirmed = true,
|
||||||
FullName = "SysAdmin",
|
FullName = "SysAdmin",
|
||||||
LockoutEnabled = false,
|
LockoutEnabled = false,
|
||||||
NormalizedEmail = "SYSADMIN@PSTW.COM.MY",
|
NormalizedEmail = "SYSADMIN@PSTW.COM.MY",
|
||||||
NormalizedUserName = "SYSADMIN@PSTW.COM.MY",
|
NormalizedUserName = "SYSADMIN@PSTW.COM.MY",
|
||||||
PasswordHash = "AQAAAAIAAYagAAAAEB/4JzIPKQK76gM4+Ddc948BoBumC8oa2Ya4odgM4r6P+LNaWRaLOaFG4bp0Iya9Sg==",
|
PasswordHash = "AQAAAAIAAYagAAAAEF3NUsfCVQ3KOv0uND7ech54XBz7+ffJ5x1YYuN0eaBciYQ/K2Jlah/KQR19ykaHbQ==",
|
||||||
PhoneNumberConfirmed = false,
|
PhoneNumberConfirmed = false,
|
||||||
SecurityStamp = "5ac5ec31-c25f-4a7a-8057-664ecdf76108",
|
SecurityStamp = "42178537-99cc-4701-a488-8f1c0e774855",
|
||||||
TwoFactorEnabled = false,
|
TwoFactorEnabled = false,
|
||||||
UserInfoStatus = 1,
|
UserInfoStatus = 1,
|
||||||
UserName = "sysadmin@pstw.com.my"
|
UserName = "sysadmin@pstw.com.my"
|
||||||
@ -816,8 +851,8 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Models.UserModel", "User")
|
b.HasOne("PSTW_CentralSystem.Models.UserModel", "User")
|
||||||
.WithMany()
|
.WithOne("Store")
|
||||||
.HasForeignKey("UserId")
|
.HasForeignKey("PSTW_CentralSystem.Areas.Inventory.Models.InventoryMasterModel", "UserId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
@ -847,8 +882,8 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ItemMovementModel", "Movement")
|
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ItemMovementModel", "Movement")
|
||||||
.WithOne("Item")
|
.WithMany()
|
||||||
.HasForeignKey("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", "MovementId");
|
.HasForeignKey("MovementId");
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", "Product")
|
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", "Product")
|
||||||
.WithMany("Items")
|
.WithMany("Items")
|
||||||
@ -869,6 +904,10 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemMovementModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemMovementModel", b =>
|
||||||
{
|
{
|
||||||
|
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", "Item")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ItemId");
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", "FromStation")
|
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", "FromStation")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("LastStation");
|
.HasForeignKey("LastStation");
|
||||||
@ -899,6 +938,8 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.Navigation("FromUser");
|
b.Navigation("FromUser");
|
||||||
|
|
||||||
|
b.Navigation("Item");
|
||||||
|
|
||||||
b.Navigation("NextStation");
|
b.Navigation("NextStation");
|
||||||
|
|
||||||
b.Navigation("NextStore");
|
b.Navigation("NextStore");
|
||||||
@ -917,6 +958,31 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
b.Navigation("Manufacturer");
|
b.Navigation("Manufacturer");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.RequestModel", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", "Product")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ProductId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", "Station")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("StationId");
|
||||||
|
|
||||||
|
b.HasOne("PSTW_CentralSystem.Models.UserModel", "User")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Product");
|
||||||
|
|
||||||
|
b.Navigation("Station");
|
||||||
|
|
||||||
|
b.Navigation("User");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("PSTW_CentralSystem.Models.DepartmentModel", "Department")
|
b.HasOne("PSTW_CentralSystem.Models.DepartmentModel", "Department")
|
||||||
@ -967,11 +1033,6 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
b.Navigation("Department");
|
b.Navigation("Department");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemMovementModel", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Item");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Items");
|
b.Navigation("Items");
|
||||||
@ -981,6 +1042,11 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
{
|
{
|
||||||
b.Navigation("Departments");
|
b.Navigation("Departments");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("PSTW_CentralSystem.Models.UserModel", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Store");
|
||||||
|
});
|
||||||
#pragma warning restore 612, 618
|
#pragma warning restore 612, 618
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9,7 +9,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||||||
namespace PSTW_CentralSystem.Migrations
|
namespace PSTW_CentralSystem.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class Initiate : Migration
|
public partial class UpdateLatest : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
@ -96,13 +96,15 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
{
|
{
|
||||||
SupplierId = table.Column<int>(type: "int", nullable: false)
|
SupplierId = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
SupplierName = table.Column<string>(type: "longtext", nullable: false)
|
SupplierCompName = table.Column<string>(type: "longtext", nullable: false)
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
SupplierGender = table.Column<string>(type: "longtext", nullable: false)
|
SupplierAddress = table.Column<string>(type: "longtext", nullable: false)
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
SupplierEmail = table.Column<string>(type: "longtext", nullable: false)
|
SupplierPIC = table.Column<string>(type: "longtext", nullable: true)
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
SupplierPhoneNo = table.Column<string>(type: "longtext", nullable: false)
|
SupplierEmail = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
SupplierPhoneNo = table.Column<string>(type: "longtext", nullable: true)
|
||||||
.Annotation("MySql:CharSet", "utf8mb4")
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
@ -189,6 +191,8 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
ProductName = table.Column<string>(type: "longtext", nullable: false)
|
ProductName = table.Column<string>(type: "longtext", nullable: false)
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
ProductShortName = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
ManufacturerId = table.Column<int>(type: "int", nullable: false),
|
ManufacturerId = table.Column<int>(type: "int", nullable: false),
|
||||||
Category = table.Column<string>(type: "longtext", nullable: false)
|
Category = table.Column<string>(type: "longtext", nullable: false)
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
@ -405,18 +409,65 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
})
|
})
|
||||||
.Annotation("MySql:CharSet", "utf8mb4");
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "request",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
requestId = table.Column<int>(type: "int", nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
ProductId = table.Column<int>(type: "int", nullable: false),
|
||||||
|
StationId = table.Column<int>(type: "int", nullable: true),
|
||||||
|
UserId = table.Column<int>(type: "int", nullable: false),
|
||||||
|
ProductCategory = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
remarkUser = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
remarkMasterInv = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
status = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
requestDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
|
approvalDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
|
RequestQuantity = table.Column<int>(type: "int", nullable: true),
|
||||||
|
Document = table.Column<string>(type: "longtext", nullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_request", x => x.requestId);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_request_AspNetUsers_UserId",
|
||||||
|
column: x => x.UserId,
|
||||||
|
principalTable: "AspNetUsers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_request_Products_ProductId",
|
||||||
|
column: x => x.ProductId,
|
||||||
|
principalTable: "Products",
|
||||||
|
principalColumn: "ProductId",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_request_Stations_StationId",
|
||||||
|
column: x => x.StationId,
|
||||||
|
principalTable: "Stations",
|
||||||
|
principalColumn: "StationId");
|
||||||
|
})
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "ItemMovements",
|
name: "ItemMovements",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<int>(type: "int", nullable: false)
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
ItemId = table.Column<int>(type: "int", nullable: false),
|
ItemId = table.Column<int>(type: "int", nullable: true),
|
||||||
ToStation = table.Column<int>(type: "int", nullable: true),
|
ToStation = table.Column<int>(type: "int", nullable: true),
|
||||||
ToStore = table.Column<int>(type: "int", nullable: true),
|
ToStore = table.Column<int>(type: "int", nullable: true),
|
||||||
ToUser = table.Column<int>(type: "int", nullable: true),
|
ToUser = table.Column<int>(type: "int", nullable: true),
|
||||||
ToOther = table.Column<string>(type: "longtext", nullable: true, comment: "Repair, Calibration, Faulty, Ready To Deploy, On Delivery")
|
ToOther = table.Column<string>(type: "longtext", nullable: true, comment: "Repair, Calibration, Faulty, Ready To Deploy, On Delivery")
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
sendDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
Action = table.Column<string>(type: "longtext", nullable: true, comment: "Register, StockIn, Stock Out")
|
Action = table.Column<string>(type: "longtext", nullable: true, comment: "Register, StockIn, Stock Out")
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
Quantity = table.Column<int>(type: "int", nullable: true),
|
Quantity = table.Column<int>(type: "int", nullable: true),
|
||||||
@ -430,6 +481,7 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
LastStation = table.Column<int>(type: "int", nullable: true),
|
LastStation = table.Column<int>(type: "int", nullable: true),
|
||||||
LatestStatus = table.Column<string>(type: "longtext", nullable: true, comment: "Repair, Calibration, Faulty, Ready To Deploy, On Delivery")
|
LatestStatus = table.Column<string>(type: "longtext", nullable: true, comment: "Repair, Calibration, Faulty, Ready To Deploy, On Delivery")
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
|
receiveDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
MovementComplete = table.Column<bool>(type: "tinyint(1)", nullable: false)
|
MovementComplete = table.Column<bool>(type: "tinyint(1)", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
@ -504,6 +556,8 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
InvoiceDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
InvoiceDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||||
ItemStatus = table.Column<int>(type: "int", nullable: false, comment: "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;"),
|
ItemStatus = table.Column<int>(type: "int", nullable: false, comment: "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;"),
|
||||||
MovementId = table.Column<int>(type: "int", nullable: true),
|
MovementId = table.Column<int>(type: "int", nullable: true),
|
||||||
|
PartNumber = table.Column<string>(type: "longtext", nullable: false)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
CreatedByUserId = table.Column<int>(type: "int", nullable: false)
|
CreatedByUserId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
@ -559,8 +613,8 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
columns: new[] { "Id", "AccessFailedCount", "ConcurrencyStamp", "Email", "EmailConfirmed", "FullName", "LockoutEnabled", "LockoutEnd", "NormalizedEmail", "NormalizedUserName", "PasswordHash", "PhoneNumber", "PhoneNumberConfirmed", "SecurityStamp", "TwoFactorEnabled", "UserInfoStatus", "UserName", "departmentId" },
|
columns: new[] { "Id", "AccessFailedCount", "ConcurrencyStamp", "Email", "EmailConfirmed", "FullName", "LockoutEnabled", "LockoutEnd", "NormalizedEmail", "NormalizedUserName", "PasswordHash", "PhoneNumber", "PhoneNumberConfirmed", "SecurityStamp", "TwoFactorEnabled", "UserInfoStatus", "UserName", "departmentId" },
|
||||||
values: new object[,]
|
values: new object[,]
|
||||||
{
|
{
|
||||||
{ 1, 0, "4c8e81ae-2e43-4f98-82a0-4d7c4aa6d011", "admin@pstw.com.my", true, "MAAdmin", false, null, "ADMIN@PSTW.COM.MY", "ADMIN@PSTW.COM.MY", "AQAAAAIAAYagAAAAEKr0d9Fe168hXvdX6+oJvbfo2QHFsp8i/EQjhLbkWRn/yvKImJa6XzZ5KJ6qohTE1w==", null, false, "2219ec34-d4a0-496b-a7d7-e6c5d7b2a222", false, 1, "admin@pstw.com.my", null },
|
{ 1, 0, "402e8e19-59a4-4fae-8ffe-4d935bcb1104", "admin@pstw.com.my", true, "MAAdmin", false, null, "ADMIN@PSTW.COM.MY", "ADMIN@PSTW.COM.MY", "AQAAAAIAAYagAAAAEM22wL5Kx9mwPIJilJAgzudLHg+HduDhJaq+BjD3jh5bqPzi+OnTzAEN49l1IeBqcw==", null, false, "4a127c4f-3199-4037-8c02-0a21b750351b", false, 1, "admin@pstw.com.my", null },
|
||||||
{ 2, 0, "bcc1500e-9ae2-4704-9997-dbe646d2fa7a", "sysadmin@pstw.com.my", true, "SysAdmin", false, null, "SYSADMIN@PSTW.COM.MY", "SYSADMIN@PSTW.COM.MY", "AQAAAAIAAYagAAAAEE3CUAWzIeL592V5xPyAD5ciHe8OGtvbNHhU6UNafDMT/+0R77o6UCDj/K8wc0j0Xw==", null, false, "7c582e0d-8237-4605-8fec-449bbe78f6c9", false, 1, "sysadmin@pstw.com.my", null }
|
{ 2, 0, "05ebfe99-3f46-43b8-9aaa-e01c5bb31a86", "sysadmin@pstw.com.my", true, "SysAdmin", false, null, "SYSADMIN@PSTW.COM.MY", "SYSADMIN@PSTW.COM.MY", "AQAAAAIAAYagAAAAEF3NUsfCVQ3KOv0uND7ech54XBz7+ffJ5x1YYuN0eaBciYQ/K2Jlah/KQR19ykaHbQ==", null, false, "42178537-99cc-4701-a488-8f1c0e774855", false, 1, "sysadmin@pstw.com.my", null }
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.InsertData(
|
migrationBuilder.InsertData(
|
||||||
@ -622,7 +676,13 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_InventoryMasters_UserId",
|
name: "IX_InventoryMasters_UserId",
|
||||||
table: "InventoryMasters",
|
table: "InventoryMasters",
|
||||||
column: "UserId");
|
column: "UserId",
|
||||||
|
unique: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ItemMovements_ItemId",
|
||||||
|
table: "ItemMovements",
|
||||||
|
column: "ItemId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_ItemMovements_LastStation",
|
name: "IX_ItemMovements_LastStation",
|
||||||
@ -672,8 +732,7 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_Items_MovementId",
|
name: "IX_Items_MovementId",
|
||||||
table: "Items",
|
table: "Items",
|
||||||
column: "MovementId",
|
column: "MovementId");
|
||||||
unique: true);
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_Items_ProductId",
|
name: "IX_Items_ProductId",
|
||||||
@ -685,6 +744,21 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
table: "Products",
|
table: "Products",
|
||||||
column: "ManufacturerId");
|
column: "ManufacturerId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_request_ProductId",
|
||||||
|
table: "request",
|
||||||
|
column: "ProductId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_request_StationId",
|
||||||
|
table: "request",
|
||||||
|
column: "StationId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_request_UserId",
|
||||||
|
table: "request",
|
||||||
|
column: "UserId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_Stations_DepartmentId",
|
name: "IX_Stations_DepartmentId",
|
||||||
table: "Stations",
|
table: "Stations",
|
||||||
@ -699,11 +773,62 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
name: "IX_Stores_CompanyId",
|
name: "IX_Stores_CompanyId",
|
||||||
table: "Stores",
|
table: "Stores",
|
||||||
column: "CompanyId");
|
column: "CompanyId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_ItemMovements_Items_ItemId",
|
||||||
|
table: "ItemMovements",
|
||||||
|
column: "ItemId",
|
||||||
|
principalTable: "Items",
|
||||||
|
principalColumn: "ItemID");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_ItemMovements_AspNetUsers_LastUser",
|
||||||
|
table: "ItemMovements");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_ItemMovements_AspNetUsers_ToUser",
|
||||||
|
table: "ItemMovements");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Items_AspNetUsers_CreatedByUserId",
|
||||||
|
table: "Items");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Stations_AspNetUsers_StationPicID",
|
||||||
|
table: "Stations");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Items_Departments_DepartmentId",
|
||||||
|
table: "Items");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Stations_Departments_DepartmentId",
|
||||||
|
table: "Stations");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Items_Companies_CompanyId",
|
||||||
|
table: "Items");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Stores_Companies_CompanyId",
|
||||||
|
table: "Stores");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_ItemMovements_Stores_LastStore",
|
||||||
|
table: "ItemMovements");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_ItemMovements_Stores_ToStore",
|
||||||
|
table: "ItemMovements");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_ItemMovements_Items_ItemId",
|
||||||
|
table: "ItemMovements");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "AspNetRoleClaims");
|
name: "AspNetRoleClaims");
|
||||||
|
|
||||||
@ -723,10 +848,10 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
name: "InventoryMasters");
|
name: "InventoryMasters");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Items");
|
name: "ModuleSettings");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "ModuleSettings");
|
name: "request");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Suppliers");
|
name: "Suppliers");
|
||||||
@ -734,6 +859,21 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "AspNetRoles");
|
name: "AspNetRoles");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "AspNetUsers");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Departments");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Companies");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Stores");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Items");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "ItemMovements");
|
name: "ItemMovements");
|
||||||
|
|
||||||
@ -743,20 +883,8 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Stations");
|
name: "Stations");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Stores");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Manufacturers");
|
name: "Manufacturers");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "AspNetUsers");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Departments");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Companies");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -147,9 +147,10 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.HasKey("StoreId");
|
b.HasKey("StoreId");
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
b.HasIndex("UserId")
|
||||||
|
.IsUnique();
|
||||||
|
|
||||||
b.ToTable("InventoryMasters");
|
b.ToTable("InventoryMasters", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", b =>
|
||||||
@ -246,12 +247,11 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.HasIndex("DepartmentId");
|
b.HasIndex("DepartmentId");
|
||||||
|
|
||||||
b.HasIndex("MovementId")
|
b.HasIndex("MovementId");
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.HasIndex("ProductId");
|
b.HasIndex("ProductId");
|
||||||
|
|
||||||
b.ToTable("Items");
|
b.ToTable("Items", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemMovementModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemMovementModel", b =>
|
||||||
@ -272,7 +272,7 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
b.Property<DateTime>("Date")
|
b.Property<DateTime>("Date")
|
||||||
.HasColumnType("datetime(6)");
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
b.Property<int>("ItemId")
|
b.Property<int?>("ItemId")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<int?>("LastStation")
|
b.Property<int?>("LastStation")
|
||||||
@ -310,8 +310,16 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
b.Property<int?>("ToUser")
|
b.Property<int?>("ToUser")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("receiveDate")
|
||||||
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("sendDate")
|
||||||
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ItemId");
|
||||||
|
|
||||||
b.HasIndex("LastStation");
|
b.HasIndex("LastStation");
|
||||||
|
|
||||||
b.HasIndex("LastStore");
|
b.HasIndex("LastStore");
|
||||||
@ -324,7 +332,7 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.HasIndex("ToUser");
|
b.HasIndex("ToUser");
|
||||||
|
|
||||||
b.ToTable("ItemMovements");
|
b.ToTable("ItemMovements", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ManufacturerModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ManufacturerModel", b =>
|
||||||
@ -341,7 +349,7 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.HasKey("ManufacturerId");
|
b.HasKey("ManufacturerId");
|
||||||
|
|
||||||
b.ToTable("Manufacturers");
|
b.ToTable("Manufacturers", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b =>
|
||||||
@ -382,7 +390,7 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.HasIndex("ManufacturerId");
|
b.HasIndex("ManufacturerId");
|
||||||
|
|
||||||
b.ToTable("Products");
|
b.ToTable("Products", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.RequestModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.RequestModel", b =>
|
||||||
@ -393,10 +401,31 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("requestId"));
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("requestId"));
|
||||||
|
|
||||||
b.Property<DateTime>("approvalDate")
|
b.Property<string>("Document")
|
||||||
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
|
b.Property<string>("ProductCategory")
|
||||||
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
|
b.Property<int>("ProductId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int?>("RequestQuantity")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int?>("StationId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<int>("UserId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("approvalDate")
|
||||||
.HasColumnType("datetime(6)");
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
b.Property<string>("remark")
|
b.Property<string>("remarkMasterInv")
|
||||||
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
|
b.Property<string>("remarkUser")
|
||||||
.HasColumnType("longtext");
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
b.Property<DateTime>("requestDate")
|
b.Property<DateTime>("requestDate")
|
||||||
@ -407,7 +436,13 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.HasKey("requestId");
|
b.HasKey("requestId");
|
||||||
|
|
||||||
b.ToTable("Request");
|
b.HasIndex("ProductId");
|
||||||
|
|
||||||
|
b.HasIndex("StationId");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
b.ToTable("request", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", b =>
|
||||||
@ -433,7 +468,7 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.HasIndex("StationPicID");
|
b.HasIndex("StationPicID");
|
||||||
|
|
||||||
b.ToTable("Stations");
|
b.ToTable("Stations", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.StoreModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.StoreModel", b =>
|
||||||
@ -455,7 +490,7 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.HasIndex("CompanyId");
|
b.HasIndex("CompanyId");
|
||||||
|
|
||||||
b.ToTable("Stores");
|
b.ToTable("Stores", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.SupplierModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.SupplierModel", b =>
|
||||||
@ -485,7 +520,7 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.HasKey("SupplierId");
|
b.HasKey("SupplierId");
|
||||||
|
|
||||||
b.ToTable("Suppliers");
|
b.ToTable("Suppliers", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Models.CompanyModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Models.CompanyModel", b =>
|
||||||
@ -502,7 +537,7 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.HasKey("CompanyId");
|
b.HasKey("CompanyId");
|
||||||
|
|
||||||
b.ToTable("Companies");
|
b.ToTable("Companies", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Models.DepartmentModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Models.DepartmentModel", b =>
|
||||||
@ -528,7 +563,7 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.HasIndex("CompanyId");
|
b.HasIndex("CompanyId");
|
||||||
|
|
||||||
b.ToTable("Departments");
|
b.ToTable("Departments", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Models.ModuleSettingModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Models.ModuleSettingModel", b =>
|
||||||
@ -558,7 +593,7 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.HasKey("SettingId");
|
b.HasKey("SettingId");
|
||||||
|
|
||||||
b.ToTable("ModuleSettings");
|
b.ToTable("ModuleSettings", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Models.RoleModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Models.RoleModel", b =>
|
||||||
@ -719,16 +754,16 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
{
|
{
|
||||||
Id = 1,
|
Id = 1,
|
||||||
AccessFailedCount = 0,
|
AccessFailedCount = 0,
|
||||||
ConcurrencyStamp = "6b8e8dbd-4380-4e8c-aa0b-1c1fffc3059c",
|
ConcurrencyStamp = "402e8e19-59a4-4fae-8ffe-4d935bcb1104",
|
||||||
Email = "admin@pstw.com.my",
|
Email = "admin@pstw.com.my",
|
||||||
EmailConfirmed = true,
|
EmailConfirmed = true,
|
||||||
FullName = "MAAdmin",
|
FullName = "MAAdmin",
|
||||||
LockoutEnabled = false,
|
LockoutEnabled = false,
|
||||||
NormalizedEmail = "ADMIN@PSTW.COM.MY",
|
NormalizedEmail = "ADMIN@PSTW.COM.MY",
|
||||||
NormalizedUserName = "ADMIN@PSTW.COM.MY",
|
NormalizedUserName = "ADMIN@PSTW.COM.MY",
|
||||||
PasswordHash = "AQAAAAIAAYagAAAAEFKtr2LZjKgfLzY44m8cVW4qpdwci45lnh/t3ioymIh6Ib6c85ne3QGfnUAyERwMWg==",
|
PasswordHash = "AQAAAAIAAYagAAAAEM22wL5Kx9mwPIJilJAgzudLHg+HduDhJaq+BjD3jh5bqPzi+OnTzAEN49l1IeBqcw==",
|
||||||
PhoneNumberConfirmed = false,
|
PhoneNumberConfirmed = false,
|
||||||
SecurityStamp = "79e606c8-032b-426b-8fb2-7727b93823eb",
|
SecurityStamp = "4a127c4f-3199-4037-8c02-0a21b750351b",
|
||||||
TwoFactorEnabled = false,
|
TwoFactorEnabled = false,
|
||||||
UserInfoStatus = 1,
|
UserInfoStatus = 1,
|
||||||
UserName = "admin@pstw.com.my"
|
UserName = "admin@pstw.com.my"
|
||||||
@ -737,16 +772,16 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
{
|
{
|
||||||
Id = 2,
|
Id = 2,
|
||||||
AccessFailedCount = 0,
|
AccessFailedCount = 0,
|
||||||
ConcurrencyStamp = "8bf46c63-d7df-4ac5-bab2-fc15fe881302",
|
ConcurrencyStamp = "05ebfe99-3f46-43b8-9aaa-e01c5bb31a86",
|
||||||
Email = "sysadmin@pstw.com.my",
|
Email = "sysadmin@pstw.com.my",
|
||||||
EmailConfirmed = true,
|
EmailConfirmed = true,
|
||||||
FullName = "SysAdmin",
|
FullName = "SysAdmin",
|
||||||
LockoutEnabled = false,
|
LockoutEnabled = false,
|
||||||
NormalizedEmail = "SYSADMIN@PSTW.COM.MY",
|
NormalizedEmail = "SYSADMIN@PSTW.COM.MY",
|
||||||
NormalizedUserName = "SYSADMIN@PSTW.COM.MY",
|
NormalizedUserName = "SYSADMIN@PSTW.COM.MY",
|
||||||
PasswordHash = "AQAAAAIAAYagAAAAEB/4JzIPKQK76gM4+Ddc948BoBumC8oa2Ya4odgM4r6P+LNaWRaLOaFG4bp0Iya9Sg==",
|
PasswordHash = "AQAAAAIAAYagAAAAEF3NUsfCVQ3KOv0uND7ech54XBz7+ffJ5x1YYuN0eaBciYQ/K2Jlah/KQR19ykaHbQ==",
|
||||||
PhoneNumberConfirmed = false,
|
PhoneNumberConfirmed = false,
|
||||||
SecurityStamp = "5ac5ec31-c25f-4a7a-8057-664ecdf76108",
|
SecurityStamp = "42178537-99cc-4701-a488-8f1c0e774855",
|
||||||
TwoFactorEnabled = false,
|
TwoFactorEnabled = false,
|
||||||
UserInfoStatus = 1,
|
UserInfoStatus = 1,
|
||||||
UserName = "sysadmin@pstw.com.my"
|
UserName = "sysadmin@pstw.com.my"
|
||||||
@ -813,8 +848,8 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Models.UserModel", "User")
|
b.HasOne("PSTW_CentralSystem.Models.UserModel", "User")
|
||||||
.WithMany()
|
.WithOne("Store")
|
||||||
.HasForeignKey("UserId")
|
.HasForeignKey("PSTW_CentralSystem.Areas.Inventory.Models.InventoryMasterModel", "UserId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
@ -844,8 +879,8 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ItemMovementModel", "Movement")
|
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ItemMovementModel", "Movement")
|
||||||
.WithOne("Item")
|
.WithMany()
|
||||||
.HasForeignKey("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", "MovementId");
|
.HasForeignKey("MovementId");
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", "Product")
|
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", "Product")
|
||||||
.WithMany("Items")
|
.WithMany("Items")
|
||||||
@ -866,6 +901,10 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemMovementModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemMovementModel", b =>
|
||||||
{
|
{
|
||||||
|
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", "Item")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ItemId");
|
||||||
|
|
||||||
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", "FromStation")
|
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", "FromStation")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("LastStation");
|
.HasForeignKey("LastStation");
|
||||||
@ -896,6 +935,8 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
|
|
||||||
b.Navigation("FromUser");
|
b.Navigation("FromUser");
|
||||||
|
|
||||||
|
b.Navigation("Item");
|
||||||
|
|
||||||
b.Navigation("NextStation");
|
b.Navigation("NextStation");
|
||||||
|
|
||||||
b.Navigation("NextStore");
|
b.Navigation("NextStore");
|
||||||
@ -914,6 +955,31 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
b.Navigation("Manufacturer");
|
b.Navigation("Manufacturer");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.RequestModel", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", "Product")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ProductId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", "Station")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("StationId");
|
||||||
|
|
||||||
|
b.HasOne("PSTW_CentralSystem.Models.UserModel", "User")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Product");
|
||||||
|
|
||||||
|
b.Navigation("Station");
|
||||||
|
|
||||||
|
b.Navigation("User");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.StationModel", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("PSTW_CentralSystem.Models.DepartmentModel", "Department")
|
b.HasOne("PSTW_CentralSystem.Models.DepartmentModel", "Department")
|
||||||
@ -964,11 +1030,6 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
b.Navigation("Department");
|
b.Navigation("Department");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemMovementModel", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Item");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b =>
|
modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Items");
|
b.Navigation("Items");
|
||||||
@ -978,6 +1039,11 @@ namespace PSTW_CentralSystem.Migrations
|
|||||||
{
|
{
|
||||||
b.Navigation("Departments");
|
b.Navigation("Departments");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("PSTW_CentralSystem.Models.UserModel", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Store");
|
||||||
|
});
|
||||||
#pragma warning restore 612, 618
|
#pragma warning restore 612, 618
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,7 +31,6 @@
|
|||||||
<Folder Include="Areas\JSA\Views\" />
|
<Folder Include="Areas\JSA\Views\" />
|
||||||
<Folder Include="Areas\Report\Models\" />
|
<Folder Include="Areas\Report\Models\" />
|
||||||
<Folder Include="Logs\" />
|
<Folder Include="Logs\" />
|
||||||
<Folder Include="Migrations\" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"windowsAuthentication": false,
|
"windowsAuthentication": false,
|
||||||
"anonymousAuthentication": true,
|
"anonymousAuthentication": true,
|
||||||
"iisExpress": {
|
"iisExpress": {
|
||||||
"applicationUrl": "http://localhost:26468",
|
"applicationUrl": "http://192.168.11.117:26468",
|
||||||
"sslPort": 44356
|
"sslPort": 44356
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -13,7 +13,7 @@
|
|||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"dotnetRunMessages": true,
|
"dotnetRunMessages": true,
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"applicationUrl": "http://localhost:5124",
|
"applicationUrl": "http://192.168.11.117:5124",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
}
|
||||||
@ -22,7 +22,7 @@
|
|||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"dotnetRunMessages": true,
|
"dotnetRunMessages": true,
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"applicationUrl": "https://localhost:7036;http://localhost:5124",
|
"applicationUrl": "https://192.168.11.117:7036;http://192.168.11.117:5124",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user