From 0168aa19299c44013885e2ae28aa21fbf7ef7669 Mon Sep 17 00:00:00 2001 From: Mohd Ariff Date: Tue, 26 Nov 2024 16:30:40 +0800 Subject: [PATCH] Update --- Areas/Inventory/Models/DepartmentModel.cs | 2 +- Areas/Inventory/Models/ItemModel.cs | 6 +- Areas/Inventory/Models/ProductModel.cs | 9 +- .../Views/Item/ProductRegistration.cshtml | 308 +++++---- .../Main/ManifacturerRegistration.cshtml | 1 - Controllers/API/Inventory/InvMainAPI.cs | 62 ++ .../20241120071120_Initiate.Designer.cs | 392 ----------- ...241122082905_addInventoryTable.Designer.cs | 392 ----------- .../20241122082905_addInventoryTable.cs | 46 -- ...20241125030825_UpdateInventory.Designer.cs | 611 ----------------- Migrations/20241125030825_UpdateInventory.cs | 212 ------ ...0241125040942_UpdateInventory2.Designer.cs | 618 ----------------- Migrations/20241125040942_UpdateInventory2.cs | 175 ----- ...125044629_AddManifacturerModel.Designer.cs | 635 ------------------ .../20241125044629_AddManifacturerModel.cs | 65 -- ...051125_UpdateManifacturerModel.Designer.cs | 635 ------------------ .../20241125051125_UpdateManifacturerModel.cs | 66 -- ...20241125051236_UpdateManifacturerModel2.cs | 66 -- ...cs => 20241126071458_Initiate.Designer.cs} | 34 +- ...Initiate.cs => 20241126071458_Initiate.cs} | 200 +++++- Migrations/AuthDBContextModelSnapshot.cs | 30 +- PSTW_CentralSystem.csproj | 1 + wwwroot/Media/Inventory/Images/YSISonde1 | Bin 0 -> 13148 bytes 23 files changed, 473 insertions(+), 4093 deletions(-) delete mode 100644 Migrations/20241120071120_Initiate.Designer.cs delete mode 100644 Migrations/20241122082905_addInventoryTable.Designer.cs delete mode 100644 Migrations/20241122082905_addInventoryTable.cs delete mode 100644 Migrations/20241125030825_UpdateInventory.Designer.cs delete mode 100644 Migrations/20241125030825_UpdateInventory.cs delete mode 100644 Migrations/20241125040942_UpdateInventory2.Designer.cs delete mode 100644 Migrations/20241125040942_UpdateInventory2.cs delete mode 100644 Migrations/20241125044629_AddManifacturerModel.Designer.cs delete mode 100644 Migrations/20241125044629_AddManifacturerModel.cs delete mode 100644 Migrations/20241125051125_UpdateManifacturerModel.Designer.cs delete mode 100644 Migrations/20241125051125_UpdateManifacturerModel.cs delete mode 100644 Migrations/20241125051236_UpdateManifacturerModel2.cs rename Migrations/{20241125051236_UpdateManifacturerModel2.Designer.cs => 20241126071458_Initiate.Designer.cs} (95%) rename Migrations/{20241120071120_Initiate.cs => 20241126071458_Initiate.cs} (59%) create mode 100644 wwwroot/Media/Inventory/Images/YSISonde1 diff --git a/Areas/Inventory/Models/DepartmentModel.cs b/Areas/Inventory/Models/DepartmentModel.cs index 18e7fdf..a9f2fb0 100644 --- a/Areas/Inventory/Models/DepartmentModel.cs +++ b/Areas/Inventory/Models/DepartmentModel.cs @@ -10,6 +10,6 @@ namespace PSTW_CentralSystem.Areas.Inventory.Models public required string Name { get; set; } public required int CompanyId { get; set; } [ForeignKey("CompanyId")] - public virtual required CompanyModel Company { get; set; } + public virtual CompanyModel? Company { get; set; } } } diff --git a/Areas/Inventory/Models/ItemModel.cs b/Areas/Inventory/Models/ItemModel.cs index cd9b0c5..99a7fc2 100644 --- a/Areas/Inventory/Models/ItemModel.cs +++ b/Areas/Inventory/Models/ItemModel.cs @@ -24,10 +24,10 @@ namespace PSTW_CentralSystem.Areas.Inventory.Models public required DateTime EndWDate { get; set; } public required DateTime InvoiceDate { get; set; } [ForeignKey("CompanyId")] - public required virtual CompanyModel Company { get; set; } + public virtual CompanyModel? Company { get; set; } [ForeignKey("DepartmentId")] - public required virtual DepartmentModel Department { get; set; } + public virtual DepartmentModel? Department { get; set; } [ForeignKey("ProductId")] - public required virtual ProductModel Product { get; set; } + public virtual ProductModel? Product { get; set; } } } diff --git a/Areas/Inventory/Models/ProductModel.cs b/Areas/Inventory/Models/ProductModel.cs index d2bf4ee..eb64bca 100644 --- a/Areas/Inventory/Models/ProductModel.cs +++ b/Areas/Inventory/Models/ProductModel.cs @@ -8,13 +8,12 @@ namespace PSTW_CentralSystem.Areas.Inventory.Models [Key] public int ProductId { get; set; } public required string ProductName { get; set; } - public required string Manufacturer { get; set; } + public required int ManufacturerId { get; set; } public required string Category { get; set; } public required string ModelNo { get; set; } - public required int QuantityProduct { get; set; } + public int? QuantityProduct { get; set; } public required string ImageProduct { get; set; } - public required int CompanyId { get; set; } - [ForeignKey("CompanyId")] - public required virtual CompanyModel Company { get; set; } + [ForeignKey("ManufacturerId")] + public virtual ManufacturerModel? Manufacturer { get; set; } } } diff --git a/Areas/Inventory/Views/Item/ProductRegistration.cshtml b/Areas/Inventory/Views/Item/ProductRegistration.cshtml index ef59cd4..42fa89c 100644 --- a/Areas/Inventory/Views/Item/ProductRegistration.cshtml +++ b/Areas/Inventory/Views/Item/ProductRegistration.cshtml @@ -4,114 +4,127 @@ } @await Html.PartialAsync("~/Areas/Inventory/Views/_InventoryPartial.cshtml"); -
-
-
-
-
-
-
-
-

REGISTRATION PRODUCT

-
-
-
- - @* Product Name *@ -
- -
- -
+
+
+
+ +
+
+
+
+
+
+

REGISTRATION PRODUCT

+
+
- @* Manufacturer *@ -
- -
-
- + @* Product Name *@ +
+ +
+ +
+
+ + @* Manufacturer *@ +
+ +
+
+ +
+
+
+ + @* Category *@ +
+ +
+
+ +
+
+
+ +
+
+ + @* Model No Coding *@ +
+ +
+ +
+
+ + @* Image Product Coding *@ +
+ +
+ +
+ Image Preview +
+
+ +
+
+
+ +
- - @* Category *@ -
- -
-
- -
-
-
- -
-
- - @* Model No Coding *@ -
- -
- -
-
- - @* Min Quantity Coding *@ -
- -
- -
-
- - @* Image Product Coding *@ -
- -
- -
- Image Preview -
-
- -
-
-
- - -
+ +
+
- +
+ +
+
+
+
+
- +@section Scripts { +@{ + await Html.RenderPartialAsync("_ValidationScriptsPartial"); +} +} diff --git a/Areas/Inventory/Views/Main/ManifacturerRegistration.cshtml b/Areas/Inventory/Views/Main/ManifacturerRegistration.cshtml index a8bbb7f..41766fc 100644 --- a/Areas/Inventory/Views/Main/ManifacturerRegistration.cshtml +++ b/Areas/Inventory/Views/Main/ManifacturerRegistration.cshtml @@ -72,7 +72,6 @@ }) .then(response => response.json()) .then(data => { - console.log(data); if (data != null && data.length > 0) { this.manufacturer = data; diff --git a/Controllers/API/Inventory/InvMainAPI.cs b/Controllers/API/Inventory/InvMainAPI.cs index 3613946..1903b28 100644 --- a/Controllers/API/Inventory/InvMainAPI.cs +++ b/Controllers/API/Inventory/InvMainAPI.cs @@ -23,6 +23,7 @@ namespace PSTW_CentralSystem.Controllers.API.Inventory _logger = logger; _authDbContext = authDbContext; } + #region Manufacturer [HttpPost("ManufacturerList")] public async Task ManufacturerList() @@ -30,6 +31,7 @@ namespace PSTW_CentralSystem.Controllers.API.Inventory var manifacturerList = await _authDbContext.Manufacturers.ToListAsync(); return Json(manifacturerList); } + [HttpPost("AddManufacturer")] public async Task AddManufacturer([FromBody] ManufacturerModel manufacturer) { @@ -72,6 +74,66 @@ namespace PSTW_CentralSystem.Controllers.API.Inventory return Ok(new { success = true, message = "Manufacturer deleted successfully" }); } + #endregion Manufacturer + #region Product + + [HttpPost("ProductList")] + public async Task ProductList() + { + var productList = await _authDbContext.Products.Include("Manufacturer").Where(x => x.ManufacturerId == x.ManufacturerId).ToListAsync(); + return Json(productList); + } + + [HttpPost("AddProduct")] + public async Task AddProduct([FromBody] ProductModel product) + { + if (!ModelState.IsValid) + { + return BadRequest(ModelState); + } + if (product == null) + { + return NotFound("Product is null"); + } + + try + { + product.QuantityProduct = 0; + var productImage = product.ImageProduct; // Save image to wwwroot/media/inventory/images | Images name is product.ModelNo | product.ImageProduct is in base64 string + if (!string.IsNullOrEmpty(product.ImageProduct)) + { + var bytes = Convert.FromBase64String(product.ImageProduct); + var filePath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot/media/inventory/images", product.ModelNo); + await System.IO.File.WriteAllBytesAsync(filePath, bytes); + product.ImageProduct = "/media/inventory/images/" + product.ModelNo; + } + _authDbContext.Products.Add(product); + await _authDbContext.SaveChangesAsync(); + var updatedList = await _authDbContext.Manufacturers.Include("Manufacturer").Where(x => x.ManufacturerId == x.ManufacturerId).ToListAsync(); + return Json(updatedList); + } + catch (Exception ex) + { + return BadRequest(ex.Message); + } + } + + [HttpDelete("DeleteProduct/{id}")] + public async Task DeleteProduct(int id) + { + var Product = await _authDbContext.Manufacturers.FindAsync(id); + if (Product == null) + { + return NotFound(new { success = false, message = "Product not found" }); + } + + _authDbContext.Manufacturers.Remove(Product); + await _authDbContext.SaveChangesAsync(); + + return Ok(new { success = true, message = "Product deleted successfully" }); + } + + #endregion Product } } diff --git a/Migrations/20241120071120_Initiate.Designer.cs b/Migrations/20241120071120_Initiate.Designer.cs deleted file mode 100644 index b66f76a..0000000 --- a/Migrations/20241120071120_Initiate.Designer.cs +++ /dev/null @@ -1,392 +0,0 @@ -// -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(AuthDBContext))] - [Migration("20241120071120_Initiate")] - partial class Initiate - { - /// - 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", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("longtext"); - - b.Property("ClaimValue") - .HasColumnType("longtext"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("longtext"); - - b.Property("ClaimValue") - .HasColumnType("longtext"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("varchar(255)"); - - b.Property("ProviderKey") - .HasColumnType("varchar(255)"); - - b.Property("ProviderDisplayName") - .HasColumnType("longtext"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - - b.HasData( - new - { - UserId = 1, - RoleId = 1 - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("LoginProvider") - .HasColumnType("varchar(255)"); - - b.Property("Name") - .HasColumnType("varchar(255)"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.ModuleSettingModel", b => - { - b.Property("SettingId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SettingId")); - - b.Property("AllowedUserType") - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("MethodAllowedUserType") - .HasColumnType("json"); - - b.Property("ModuleName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ModuleStatus") - .HasColumnType("int"); - - b.HasKey("SettingId"); - - b.ToTable("ModuleSettings"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.RoleModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("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" - }); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.UserModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("longtext"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("tinyint(1)"); - - b.Property("FullName") - .HasColumnType("longtext"); - - b.Property("LockoutEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("longtext"); - - b.Property("PhoneNumber") - .HasColumnType("longtext"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("tinyint(1)"); - - b.Property("SecurityStamp") - .HasColumnType("longtext"); - - b.Property("TwoFactorEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("UserStatus") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - - b.HasData( - new - { - Id = 1, - AccessFailedCount = 0, - ConcurrencyStamp = "e4431078-c853-410b-8369-eba4c21937f0", - Email = "admin@pstw.com.my", - EmailConfirmed = true, - FullName = "MAAdmin", - LockoutEnabled = false, - NormalizedEmail = "ADMIN@PSTW.COM.MY", - NormalizedUserName = "ADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAENdEN8F2O8D9gJofhSQV6UDhcjh2+C7TvjAC+KgJMUbFJbGBNXPvOORKISb0jRhftA==", - PhoneNumberConfirmed = false, - SecurityStamp = "bce6229e-4b74-4324-a89d-5f3210daccfb", - TwoFactorEnabled = false, - UserName = "admin@pstw.com.my" - }, - new - { - Id = 2, - AccessFailedCount = 0, - ConcurrencyStamp = "94504423-6916-4a9e-baf2-271beb3b3f2a", - Email = "sysadmin@pstw.com.my", - EmailConfirmed = true, - FullName = "SysAdmin", - LockoutEnabled = false, - NormalizedEmail = "SYSADMIN@PSTW.COM.MY", - NormalizedUserName = "SYSADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAEApFYVWK3qRpzEM6jFFw5EDohJ+xHCxX2EDABsUg65pa0iA1h54wp9yf/gp2qVxvVg==", - PhoneNumberConfirmed = false, - SecurityStamp = "0d07b058-1d11-40a9-875e-6631d26702cb", - TwoFactorEnabled = false, - UserName = "sysadmin@pstw.com.my" - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("PSTW_CentralSystem.Models.RoleModel", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", 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", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Migrations/20241122082905_addInventoryTable.Designer.cs b/Migrations/20241122082905_addInventoryTable.Designer.cs deleted file mode 100644 index c12b285..0000000 --- a/Migrations/20241122082905_addInventoryTable.Designer.cs +++ /dev/null @@ -1,392 +0,0 @@ -// -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(AuthDBContext))] - [Migration("20241122082905_addInventoryTable")] - partial class addInventoryTable - { - /// - 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", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("longtext"); - - b.Property("ClaimValue") - .HasColumnType("longtext"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("longtext"); - - b.Property("ClaimValue") - .HasColumnType("longtext"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("varchar(255)"); - - b.Property("ProviderKey") - .HasColumnType("varchar(255)"); - - b.Property("ProviderDisplayName") - .HasColumnType("longtext"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - - b.HasData( - new - { - UserId = 1, - RoleId = 1 - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("LoginProvider") - .HasColumnType("varchar(255)"); - - b.Property("Name") - .HasColumnType("varchar(255)"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.ModuleSettingModel", b => - { - b.Property("SettingId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SettingId")); - - b.Property("AllowedUserType") - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("MethodAllowedUserType") - .HasColumnType("json"); - - b.Property("ModuleName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ModuleStatus") - .HasColumnType("int"); - - b.HasKey("SettingId"); - - b.ToTable("ModuleSettings"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.RoleModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("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" - }); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.UserModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("longtext"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("tinyint(1)"); - - b.Property("FullName") - .HasColumnType("longtext"); - - b.Property("LockoutEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("longtext"); - - b.Property("PhoneNumber") - .HasColumnType("longtext"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("tinyint(1)"); - - b.Property("SecurityStamp") - .HasColumnType("longtext"); - - b.Property("TwoFactorEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("UserStatus") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - - b.HasData( - new - { - Id = 1, - AccessFailedCount = 0, - ConcurrencyStamp = "f79b6001-14b2-4a38-9053-260da45ada52", - Email = "admin@pstw.com.my", - EmailConfirmed = true, - FullName = "MAAdmin", - LockoutEnabled = false, - NormalizedEmail = "ADMIN@PSTW.COM.MY", - NormalizedUserName = "ADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAEOYjD3O+nyYU9Fk9q39d6tSeunezi9sWZCz4DbTkHsR6Dc7+FOkgYtFdC/SUbQY6qw==", - PhoneNumberConfirmed = false, - SecurityStamp = "7d64818d-d890-4c39-9bf9-f74c69fcfb1b", - TwoFactorEnabled = false, - UserName = "admin@pstw.com.my" - }, - new - { - Id = 2, - AccessFailedCount = 0, - ConcurrencyStamp = "bdf8a940-37e3-4c91-9f3e-c69d9aaea315", - Email = "sysadmin@pstw.com.my", - EmailConfirmed = true, - FullName = "SysAdmin", - LockoutEnabled = false, - NormalizedEmail = "SYSADMIN@PSTW.COM.MY", - NormalizedUserName = "SYSADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAEG8sIA+qY2dDrUrmX4jmFgKojC/X8pT9bv60D+yIy93/8vNy6qmRgLqebYjkZ1CjVw==", - PhoneNumberConfirmed = false, - SecurityStamp = "07ca3eae-b820-4219-b52f-7957244e272f", - TwoFactorEnabled = false, - UserName = "sysadmin@pstw.com.my" - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("PSTW_CentralSystem.Models.RoleModel", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", 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", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Migrations/20241122082905_addInventoryTable.cs b/Migrations/20241122082905_addInventoryTable.cs deleted file mode 100644 index 86208cf..0000000 --- a/Migrations/20241122082905_addInventoryTable.cs +++ /dev/null @@ -1,46 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace PSTW_CentralSystem.Migrations -{ - /// - public partial class addInventoryTable : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 1, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "f79b6001-14b2-4a38-9053-260da45ada52", "AQAAAAIAAYagAAAAEOYjD3O+nyYU9Fk9q39d6tSeunezi9sWZCz4DbTkHsR6Dc7+FOkgYtFdC/SUbQY6qw==", "7d64818d-d890-4c39-9bf9-f74c69fcfb1b" }); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 2, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "bdf8a940-37e3-4c91-9f3e-c69d9aaea315", "AQAAAAIAAYagAAAAEG8sIA+qY2dDrUrmX4jmFgKojC/X8pT9bv60D+yIy93/8vNy6qmRgLqebYjkZ1CjVw==", "07ca3eae-b820-4219-b52f-7957244e272f" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 1, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "e4431078-c853-410b-8369-eba4c21937f0", "AQAAAAIAAYagAAAAENdEN8F2O8D9gJofhSQV6UDhcjh2+C7TvjAC+KgJMUbFJbGBNXPvOORKISb0jRhftA==", "bce6229e-4b74-4324-a89d-5f3210daccfb" }); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 2, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "94504423-6916-4a9e-baf2-271beb3b3f2a", "AQAAAAIAAYagAAAAEApFYVWK3qRpzEM6jFFw5EDohJ+xHCxX2EDABsUg65pa0iA1h54wp9yf/gp2qVxvVg==", "0d07b058-1d11-40a9-875e-6631d26702cb" }); - } - } -} diff --git a/Migrations/20241125030825_UpdateInventory.Designer.cs b/Migrations/20241125030825_UpdateInventory.Designer.cs deleted file mode 100644 index a2add1e..0000000 --- a/Migrations/20241125030825_UpdateInventory.Designer.cs +++ /dev/null @@ -1,611 +0,0 @@ -// -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(AuthDBContext))] - [Migration("20241125030825_UpdateInventory")] - partial class UpdateInventory - { - /// - 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", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("longtext"); - - b.Property("ClaimValue") - .HasColumnType("longtext"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("longtext"); - - b.Property("ClaimValue") - .HasColumnType("longtext"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("varchar(255)"); - - b.Property("ProviderKey") - .HasColumnType("varchar(255)"); - - b.Property("ProviderDisplayName") - .HasColumnType("longtext"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - - b.HasData( - new - { - UserId = 1, - RoleId = 1 - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("LoginProvider") - .HasColumnType("varchar(255)"); - - b.Property("Name") - .HasColumnType("varchar(255)"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", b => - { - b.Property("CompanyId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CompanyId")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CompanyId"); - - b.ToTable("Companies"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.DepartmentModel", b => - { - b.Property("DepartmentId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DepartmentId")); - - b.Property("CompanyId") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("DepartmentId"); - - b.HasIndex("CompanyId"); - - b.ToTable("Departments"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", b => - { - b.Property("ItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); - - b.Property("CompanyId") - .HasColumnType("int"); - - b.Property("ConvertPrice") - .HasColumnType("float"); - - b.Property("Currency") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CurrencyRate") - .HasColumnType("float"); - - b.Property("DODate") - .HasColumnType("datetime(6)"); - - b.Property("Dept") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("EndWDate") - .HasColumnType("datetime(6)"); - - b.Property("ImageProduct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("InvoiceDate") - .HasColumnType("datetime(6)"); - - b.Property("PONo") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PriceInRM") - .HasColumnType("float"); - - b.Property("ProductCategory") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProductName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PurchaseDate") - .HasColumnType("datetime(6)"); - - b.Property("Quantity") - .HasColumnType("int"); - - b.Property("SerialNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Supplier") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Warranty") - .HasColumnType("int"); - - b.HasKey("ItemID"); - - b.HasIndex("CompanyId"); - - b.ToTable("Items"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b => - { - b.Property("ProductId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductId")); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CompanyId") - .HasColumnType("int"); - - b.Property("ImageProduct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Manufacturer") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ModelNo") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProductName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QuantityProduct") - .HasColumnType("int"); - - b.HasKey("ProductId"); - - b.HasIndex("CompanyId"); - - b.ToTable("Products"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.SupplierModel", b => - { - b.Property("SupplierId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierId")); - - b.Property("SupplierEmail") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplierGender") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplierName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplierPhoneNo") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SupplierId"); - - b.ToTable("Suppliers"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.ModuleSettingModel", b => - { - b.Property("SettingId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SettingId")); - - b.Property("AllowedUserType") - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("MethodAllowedUserType") - .HasColumnType("json"); - - b.Property("ModuleName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ModuleStatus") - .HasColumnType("int"); - - b.HasKey("SettingId"); - - b.ToTable("ModuleSettings"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.RoleModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("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" - }); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.UserModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("longtext"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("tinyint(1)"); - - b.Property("FullName") - .HasColumnType("longtext"); - - b.Property("LockoutEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("longtext"); - - b.Property("PhoneNumber") - .HasColumnType("longtext"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("tinyint(1)"); - - b.Property("SecurityStamp") - .HasColumnType("longtext"); - - b.Property("TwoFactorEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("UserStatus") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - - b.HasData( - new - { - Id = 1, - AccessFailedCount = 0, - ConcurrencyStamp = "ca9d09a9-e64c-4e77-b4db-5f3a74347c2e", - Email = "admin@pstw.com.my", - EmailConfirmed = true, - FullName = "MAAdmin", - LockoutEnabled = false, - NormalizedEmail = "ADMIN@PSTW.COM.MY", - NormalizedUserName = "ADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAEE5O/c/d64bTFVIMdF4bXbFvJTX6o0Tfz5yMhUEHmWqKGGD+QR5awcQMkOxQrZiPyA==", - PhoneNumberConfirmed = false, - SecurityStamp = "2d5b2076-6914-4946-b8d1-58d8b1739a41", - TwoFactorEnabled = false, - UserName = "admin@pstw.com.my" - }, - new - { - Id = 2, - AccessFailedCount = 0, - ConcurrencyStamp = "29852249-ce04-40a3-b735-6aa3ec4d6fae", - Email = "sysadmin@pstw.com.my", - EmailConfirmed = true, - FullName = "SysAdmin", - LockoutEnabled = false, - NormalizedEmail = "SYSADMIN@PSTW.COM.MY", - NormalizedUserName = "SYSADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAEIxZLeIlI9khL2sAGbA9ueokgHFkd1IKX4bYRAm9vCnd0gHCPfo4SAra5ageTh7aOg==", - PhoneNumberConfirmed = false, - SecurityStamp = "889bcd81-6fec-42e5-ae31-77f759d3d88a", - TwoFactorEnabled = false, - UserName = "sysadmin@pstw.com.my" - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("PSTW_CentralSystem.Models.RoleModel", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", 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", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.DepartmentModel", b => - { - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", "Company") - .WithMany() - .HasForeignKey("CompanyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Company"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", b => - { - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", "Company") - .WithMany() - .HasForeignKey("CompanyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Company"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b => - { - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", "Company") - .WithMany() - .HasForeignKey("CompanyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Company"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Migrations/20241125030825_UpdateInventory.cs b/Migrations/20241125030825_UpdateInventory.cs deleted file mode 100644 index dbcc980..0000000 --- a/Migrations/20241125030825_UpdateInventory.cs +++ /dev/null @@ -1,212 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace PSTW_CentralSystem.Migrations -{ - /// - public partial class UpdateInventory : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Companies", - columns: table => new - { - CompanyId = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_Companies", x => x.CompanyId); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "Suppliers", - columns: table => new - { - SupplierId = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - SupplierName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SupplierGender = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SupplierEmail = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SupplierPhoneNo = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_Suppliers", x => x.SupplierId); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "Departments", - columns: table => new - { - DepartmentId = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CompanyId = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Departments", x => x.DepartmentId); - table.ForeignKey( - name: "FK_Departments_Companies_CompanyId", - column: x => x.CompanyId, - principalTable: "Companies", - principalColumn: "CompanyId", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "Items", - columns: table => new - { - ItemID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CompanyId = table.Column(type: "int", nullable: false), - Dept = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProductName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ImageProduct = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProductCategory = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SerialNumber = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Quantity = table.Column(type: "int", nullable: false), - Supplier = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - PurchaseDate = table.Column(type: "datetime(6)", nullable: false), - PONo = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Currency = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - PriceInRM = table.Column(type: "float", nullable: false), - CurrencyRate = table.Column(type: "float", nullable: false), - ConvertPrice = table.Column(type: "float", nullable: false), - DODate = table.Column(type: "datetime(6)", nullable: false), - Warranty = table.Column(type: "int", nullable: false), - EndWDate = table.Column(type: "datetime(6)", nullable: false), - InvoiceDate = table.Column(type: "datetime(6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Items", x => x.ItemID); - table.ForeignKey( - name: "FK_Items_Companies_CompanyId", - column: x => x.CompanyId, - principalTable: "Companies", - principalColumn: "CompanyId", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "Products", - columns: table => new - { - ProductId = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - ProductName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Manufacturer = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Category = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ModelNo = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - QuantityProduct = table.Column(type: "int", nullable: false), - ImageProduct = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CompanyId = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Products", x => x.ProductId); - table.ForeignKey( - name: "FK_Products_Companies_CompanyId", - column: x => x.CompanyId, - principalTable: "Companies", - principalColumn: "CompanyId", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 1, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "ca9d09a9-e64c-4e77-b4db-5f3a74347c2e", "AQAAAAIAAYagAAAAEE5O/c/d64bTFVIMdF4bXbFvJTX6o0Tfz5yMhUEHmWqKGGD+QR5awcQMkOxQrZiPyA==", "2d5b2076-6914-4946-b8d1-58d8b1739a41" }); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 2, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "29852249-ce04-40a3-b735-6aa3ec4d6fae", "AQAAAAIAAYagAAAAEIxZLeIlI9khL2sAGbA9ueokgHFkd1IKX4bYRAm9vCnd0gHCPfo4SAra5ageTh7aOg==", "889bcd81-6fec-42e5-ae31-77f759d3d88a" }); - - migrationBuilder.CreateIndex( - name: "IX_Departments_CompanyId", - table: "Departments", - column: "CompanyId"); - - migrationBuilder.CreateIndex( - name: "IX_Items_CompanyId", - table: "Items", - column: "CompanyId"); - - migrationBuilder.CreateIndex( - name: "IX_Products_CompanyId", - table: "Products", - column: "CompanyId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Departments"); - - migrationBuilder.DropTable( - name: "Items"); - - migrationBuilder.DropTable( - name: "Products"); - - migrationBuilder.DropTable( - name: "Suppliers"); - - migrationBuilder.DropTable( - name: "Companies"); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 1, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "f79b6001-14b2-4a38-9053-260da45ada52", "AQAAAAIAAYagAAAAEOYjD3O+nyYU9Fk9q39d6tSeunezi9sWZCz4DbTkHsR6Dc7+FOkgYtFdC/SUbQY6qw==", "7d64818d-d890-4c39-9bf9-f74c69fcfb1b" }); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 2, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "bdf8a940-37e3-4c91-9f3e-c69d9aaea315", "AQAAAAIAAYagAAAAEG8sIA+qY2dDrUrmX4jmFgKojC/X8pT9bv60D+yIy93/8vNy6qmRgLqebYjkZ1CjVw==", "07ca3eae-b820-4219-b52f-7957244e272f" }); - } - } -} diff --git a/Migrations/20241125040942_UpdateInventory2.Designer.cs b/Migrations/20241125040942_UpdateInventory2.Designer.cs deleted file mode 100644 index b1a1099..0000000 --- a/Migrations/20241125040942_UpdateInventory2.Designer.cs +++ /dev/null @@ -1,618 +0,0 @@ -// -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(AuthDBContext))] - [Migration("20241125040942_UpdateInventory2")] - partial class UpdateInventory2 - { - /// - 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", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("longtext"); - - b.Property("ClaimValue") - .HasColumnType("longtext"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("longtext"); - - b.Property("ClaimValue") - .HasColumnType("longtext"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("varchar(255)"); - - b.Property("ProviderKey") - .HasColumnType("varchar(255)"); - - b.Property("ProviderDisplayName") - .HasColumnType("longtext"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - - b.HasData( - new - { - UserId = 1, - RoleId = 1 - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("LoginProvider") - .HasColumnType("varchar(255)"); - - b.Property("Name") - .HasColumnType("varchar(255)"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", b => - { - b.Property("CompanyId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CompanyId")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CompanyId"); - - b.ToTable("Companies"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.DepartmentModel", b => - { - b.Property("DepartmentId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DepartmentId")); - - b.Property("CompanyId") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("DepartmentId"); - - b.HasIndex("CompanyId"); - - b.ToTable("Departments"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", b => - { - b.Property("ItemID") - .HasColumnType("varchar(255)"); - - b.Property("CompanyId") - .HasColumnType("int"); - - b.Property("ConvertPrice") - .HasColumnType("float"); - - b.Property("Currency") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CurrencyRate") - .HasColumnType("float"); - - b.Property("DODate") - .HasColumnType("datetime(6)"); - - b.Property("DepartmentId") - .HasColumnType("int"); - - b.Property("EndWDate") - .HasColumnType("datetime(6)"); - - b.Property("InvoiceDate") - .HasColumnType("datetime(6)"); - - b.Property("PONo") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PriceInRM") - .HasColumnType("float"); - - b.Property("ProductId") - .HasColumnType("int"); - - b.Property("PurchaseDate") - .HasColumnType("datetime(6)"); - - b.Property("Quantity") - .HasColumnType("int"); - - b.Property("SerialNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Supplier") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Warranty") - .HasColumnType("int"); - - b.HasKey("ItemID"); - - b.HasIndex("CompanyId"); - - b.HasIndex("DepartmentId"); - - b.HasIndex("ProductId"); - - b.ToTable("Items"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b => - { - b.Property("ProductId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductId")); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CompanyId") - .HasColumnType("int"); - - b.Property("ImageProduct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Manufacturer") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ModelNo") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProductName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QuantityProduct") - .HasColumnType("int"); - - b.HasKey("ProductId"); - - b.HasIndex("CompanyId"); - - b.ToTable("Products"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.SupplierModel", b => - { - b.Property("SupplierId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierId")); - - b.Property("SupplierEmail") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplierGender") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplierName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplierPhoneNo") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SupplierId"); - - b.ToTable("Suppliers"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.ModuleSettingModel", b => - { - b.Property("SettingId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SettingId")); - - b.Property("AllowedUserType") - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("MethodAllowedUserType") - .HasColumnType("json"); - - b.Property("ModuleName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ModuleStatus") - .HasColumnType("int"); - - b.HasKey("SettingId"); - - b.ToTable("ModuleSettings"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.RoleModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("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" - }); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.UserModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("longtext"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("tinyint(1)"); - - b.Property("FullName") - .HasColumnType("longtext"); - - b.Property("LockoutEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("longtext"); - - b.Property("PhoneNumber") - .HasColumnType("longtext"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("tinyint(1)"); - - b.Property("SecurityStamp") - .HasColumnType("longtext"); - - b.Property("TwoFactorEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("UserStatus") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - - b.HasData( - new - { - Id = 1, - AccessFailedCount = 0, - ConcurrencyStamp = "566de32b-8ac7-4fd9-9e16-d239fcf61f33", - Email = "admin@pstw.com.my", - EmailConfirmed = true, - FullName = "MAAdmin", - LockoutEnabled = false, - NormalizedEmail = "ADMIN@PSTW.COM.MY", - NormalizedUserName = "ADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAEOs61no/950C9+WFQRSQg3Wssko80bGYfLBvlMN7EOcKf4Dj9TUFLjqAiM4jc7JKqg==", - PhoneNumberConfirmed = false, - SecurityStamp = "25fbc2fb-3ac0-4a83-a4f4-4abbcf9d1942", - TwoFactorEnabled = false, - UserName = "admin@pstw.com.my" - }, - new - { - Id = 2, - AccessFailedCount = 0, - ConcurrencyStamp = "58495e52-8212-49a5-929a-04a759a1eaae", - Email = "sysadmin@pstw.com.my", - EmailConfirmed = true, - FullName = "SysAdmin", - LockoutEnabled = false, - NormalizedEmail = "SYSADMIN@PSTW.COM.MY", - NormalizedUserName = "SYSADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAEHI2wahcf8tCM2SlSfNPiluZtwp9QP2QOlom8Vc5L1FhbuZoex+1WlnhONaWtKHBZQ==", - PhoneNumberConfirmed = false, - SecurityStamp = "be73a773-8c2d-4f23-9a79-cb5d106ac1d2", - TwoFactorEnabled = false, - UserName = "sysadmin@pstw.com.my" - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("PSTW_CentralSystem.Models.RoleModel", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", 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", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.DepartmentModel", b => - { - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", "Company") - .WithMany() - .HasForeignKey("CompanyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Company"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", b => - { - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", "Company") - .WithMany() - .HasForeignKey("CompanyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.DepartmentModel", "Department") - .WithMany() - .HasForeignKey("DepartmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", "Product") - .WithMany() - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Company"); - - b.Navigation("Department"); - - b.Navigation("Product"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b => - { - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", "Company") - .WithMany() - .HasForeignKey("CompanyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Company"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Migrations/20241125040942_UpdateInventory2.cs b/Migrations/20241125040942_UpdateInventory2.cs deleted file mode 100644 index b1e73df..0000000 --- a/Migrations/20241125040942_UpdateInventory2.cs +++ /dev/null @@ -1,175 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace PSTW_CentralSystem.Migrations -{ - /// - public partial class UpdateInventory2 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Dept", - table: "Items"); - - migrationBuilder.DropColumn( - name: "ImageProduct", - table: "Items"); - - migrationBuilder.DropColumn( - name: "ProductCategory", - table: "Items"); - - migrationBuilder.DropColumn( - name: "ProductName", - table: "Items"); - - migrationBuilder.AlterColumn( - name: "ItemID", - table: "Items", - type: "varchar(255)", - nullable: false, - oldClrType: typeof(int), - oldType: "int") - .Annotation("MySql:CharSet", "utf8mb4") - .OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn); - - migrationBuilder.AddColumn( - name: "DepartmentId", - table: "Items", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "ProductId", - table: "Items", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 1, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "566de32b-8ac7-4fd9-9e16-d239fcf61f33", "AQAAAAIAAYagAAAAEOs61no/950C9+WFQRSQg3Wssko80bGYfLBvlMN7EOcKf4Dj9TUFLjqAiM4jc7JKqg==", "25fbc2fb-3ac0-4a83-a4f4-4abbcf9d1942" }); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 2, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "58495e52-8212-49a5-929a-04a759a1eaae", "AQAAAAIAAYagAAAAEHI2wahcf8tCM2SlSfNPiluZtwp9QP2QOlom8Vc5L1FhbuZoex+1WlnhONaWtKHBZQ==", "be73a773-8c2d-4f23-9a79-cb5d106ac1d2" }); - - migrationBuilder.CreateIndex( - name: "IX_Items_DepartmentId", - table: "Items", - column: "DepartmentId"); - - migrationBuilder.CreateIndex( - name: "IX_Items_ProductId", - table: "Items", - column: "ProductId"); - - migrationBuilder.AddForeignKey( - name: "FK_Items_Departments_DepartmentId", - table: "Items", - column: "DepartmentId", - principalTable: "Departments", - principalColumn: "DepartmentId", - onDelete: ReferentialAction.Cascade); - - migrationBuilder.AddForeignKey( - name: "FK_Items_Products_ProductId", - table: "Items", - column: "ProductId", - principalTable: "Products", - principalColumn: "ProductId", - onDelete: ReferentialAction.Cascade); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_Items_Departments_DepartmentId", - table: "Items"); - - migrationBuilder.DropForeignKey( - name: "FK_Items_Products_ProductId", - table: "Items"); - - migrationBuilder.DropIndex( - name: "IX_Items_DepartmentId", - table: "Items"); - - migrationBuilder.DropIndex( - name: "IX_Items_ProductId", - table: "Items"); - - migrationBuilder.DropColumn( - name: "DepartmentId", - table: "Items"); - - migrationBuilder.DropColumn( - name: "ProductId", - table: "Items"); - - migrationBuilder.AlterColumn( - name: "ItemID", - table: "Items", - type: "int", - nullable: false, - oldClrType: typeof(string), - oldType: "varchar(255)") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn) - .OldAnnotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "Dept", - table: "Items", - type: "longtext", - nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "ImageProduct", - table: "Items", - type: "longtext", - nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "ProductCategory", - table: "Items", - type: "longtext", - nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "ProductName", - table: "Items", - type: "longtext", - nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 1, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "ca9d09a9-e64c-4e77-b4db-5f3a74347c2e", "AQAAAAIAAYagAAAAEE5O/c/d64bTFVIMdF4bXbFvJTX6o0Tfz5yMhUEHmWqKGGD+QR5awcQMkOxQrZiPyA==", "2d5b2076-6914-4946-b8d1-58d8b1739a41" }); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 2, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "29852249-ce04-40a3-b735-6aa3ec4d6fae", "AQAAAAIAAYagAAAAEIxZLeIlI9khL2sAGbA9ueokgHFkd1IKX4bYRAm9vCnd0gHCPfo4SAra5ageTh7aOg==", "889bcd81-6fec-42e5-ae31-77f759d3d88a" }); - } - } -} diff --git a/Migrations/20241125044629_AddManifacturerModel.Designer.cs b/Migrations/20241125044629_AddManifacturerModel.Designer.cs deleted file mode 100644 index c6dd105..0000000 --- a/Migrations/20241125044629_AddManifacturerModel.Designer.cs +++ /dev/null @@ -1,635 +0,0 @@ -// -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(AuthDBContext))] - [Migration("20241125044629_AddManifacturerModel")] - partial class AddManifacturerModel - { - /// - 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", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("longtext"); - - b.Property("ClaimValue") - .HasColumnType("longtext"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("longtext"); - - b.Property("ClaimValue") - .HasColumnType("longtext"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("varchar(255)"); - - b.Property("ProviderKey") - .HasColumnType("varchar(255)"); - - b.Property("ProviderDisplayName") - .HasColumnType("longtext"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - - b.HasData( - new - { - UserId = 1, - RoleId = 1 - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("LoginProvider") - .HasColumnType("varchar(255)"); - - b.Property("Name") - .HasColumnType("varchar(255)"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", b => - { - b.Property("CompanyId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CompanyId")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CompanyId"); - - b.ToTable("Companies"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.DepartmentModel", b => - { - b.Property("DepartmentId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DepartmentId")); - - b.Property("CompanyId") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("DepartmentId"); - - b.HasIndex("CompanyId"); - - b.ToTable("Departments"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", b => - { - b.Property("ItemID") - .HasColumnType("varchar(255)"); - - b.Property("CompanyId") - .HasColumnType("int"); - - b.Property("ConvertPrice") - .HasColumnType("float"); - - b.Property("Currency") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CurrencyRate") - .HasColumnType("float"); - - b.Property("DODate") - .HasColumnType("datetime(6)"); - - b.Property("DepartmentId") - .HasColumnType("int"); - - b.Property("EndWDate") - .HasColumnType("datetime(6)"); - - b.Property("InvoiceDate") - .HasColumnType("datetime(6)"); - - b.Property("PONo") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PriceInRM") - .HasColumnType("float"); - - b.Property("ProductId") - .HasColumnType("int"); - - b.Property("PurchaseDate") - .HasColumnType("datetime(6)"); - - b.Property("Quantity") - .HasColumnType("int"); - - b.Property("SerialNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Supplier") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Warranty") - .HasColumnType("int"); - - b.HasKey("ItemID"); - - b.HasIndex("CompanyId"); - - b.HasIndex("DepartmentId"); - - b.HasIndex("ProductId"); - - b.ToTable("Items"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ManufacturerModel", b => - { - b.Property("ManifacturerId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ManifacturerId")); - - b.Property("ManifacturerName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("ManifacturerId"); - - b.ToTable("Manifacturers"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b => - { - b.Property("ProductId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductId")); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CompanyId") - .HasColumnType("int"); - - b.Property("ImageProduct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Manufacturer") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ModelNo") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProductName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QuantityProduct") - .HasColumnType("int"); - - b.HasKey("ProductId"); - - b.HasIndex("CompanyId"); - - b.ToTable("Products"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.SupplierModel", b => - { - b.Property("SupplierId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierId")); - - b.Property("SupplierEmail") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplierGender") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplierName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplierPhoneNo") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SupplierId"); - - b.ToTable("Suppliers"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.ModuleSettingModel", b => - { - b.Property("SettingId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SettingId")); - - b.Property("AllowedUserType") - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("MethodAllowedUserType") - .HasColumnType("json"); - - b.Property("ModuleName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ModuleStatus") - .HasColumnType("int"); - - b.HasKey("SettingId"); - - b.ToTable("ModuleSettings"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.RoleModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("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" - }); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.UserModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("longtext"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("tinyint(1)"); - - b.Property("FullName") - .HasColumnType("longtext"); - - b.Property("LockoutEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("longtext"); - - b.Property("PhoneNumber") - .HasColumnType("longtext"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("tinyint(1)"); - - b.Property("SecurityStamp") - .HasColumnType("longtext"); - - b.Property("TwoFactorEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("UserStatus") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - - b.HasData( - new - { - Id = 1, - AccessFailedCount = 0, - ConcurrencyStamp = "23e577cb-b26f-47e6-bd98-aa4e600a69cb", - Email = "admin@pstw.com.my", - EmailConfirmed = true, - FullName = "MAAdmin", - LockoutEnabled = false, - NormalizedEmail = "ADMIN@PSTW.COM.MY", - NormalizedUserName = "ADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAELWRmCIfyew1rUthl5tw5zCupjCBpto6hwQFo63NWL69M7cp2d1SCy7yoUll1jQqkQ==", - PhoneNumberConfirmed = false, - SecurityStamp = "e12db90e-efad-4d36-b0f8-af93b665dfb6", - TwoFactorEnabled = false, - UserName = "admin@pstw.com.my" - }, - new - { - Id = 2, - AccessFailedCount = 0, - ConcurrencyStamp = "ff24ec03-3b72-4b88-aa9a-a37f3141dd9c", - Email = "sysadmin@pstw.com.my", - EmailConfirmed = true, - FullName = "SysAdmin", - LockoutEnabled = false, - NormalizedEmail = "SYSADMIN@PSTW.COM.MY", - NormalizedUserName = "SYSADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAENmNTZg8skbp+aJcr4tvdrPKnYmI+Hmgi0Ah/t5Jy35zKSHNX0Dhu0BBGXVLyTliSQ==", - PhoneNumberConfirmed = false, - SecurityStamp = "b2365439-64e8-4ba3-a4e5-4043c0c4b0e0", - TwoFactorEnabled = false, - UserName = "sysadmin@pstw.com.my" - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("PSTW_CentralSystem.Models.RoleModel", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", 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", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.DepartmentModel", b => - { - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", "Company") - .WithMany() - .HasForeignKey("CompanyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Company"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", b => - { - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", "Company") - .WithMany() - .HasForeignKey("CompanyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.DepartmentModel", "Department") - .WithMany() - .HasForeignKey("DepartmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", "Product") - .WithMany() - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Company"); - - b.Navigation("Department"); - - b.Navigation("Product"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b => - { - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", "Company") - .WithMany() - .HasForeignKey("CompanyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Company"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Migrations/20241125044629_AddManifacturerModel.cs b/Migrations/20241125044629_AddManifacturerModel.cs deleted file mode 100644 index 35b7984..0000000 --- a/Migrations/20241125044629_AddManifacturerModel.cs +++ /dev/null @@ -1,65 +0,0 @@ -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace PSTW_CentralSystem.Migrations -{ - /// - public partial class AddManifacturerModel : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Manifacturers", - columns: table => new - { - ManifacturerId = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - ManifacturerName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_Manifacturers", x => x.ManifacturerId); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 1, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "23e577cb-b26f-47e6-bd98-aa4e600a69cb", "AQAAAAIAAYagAAAAELWRmCIfyew1rUthl5tw5zCupjCBpto6hwQFo63NWL69M7cp2d1SCy7yoUll1jQqkQ==", "e12db90e-efad-4d36-b0f8-af93b665dfb6" }); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 2, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "ff24ec03-3b72-4b88-aa9a-a37f3141dd9c", "AQAAAAIAAYagAAAAENmNTZg8skbp+aJcr4tvdrPKnYmI+Hmgi0Ah/t5Jy35zKSHNX0Dhu0BBGXVLyTliSQ==", "b2365439-64e8-4ba3-a4e5-4043c0c4b0e0" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Manifacturers"); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 1, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "566de32b-8ac7-4fd9-9e16-d239fcf61f33", "AQAAAAIAAYagAAAAEOs61no/950C9+WFQRSQg3Wssko80bGYfLBvlMN7EOcKf4Dj9TUFLjqAiM4jc7JKqg==", "25fbc2fb-3ac0-4a83-a4f4-4abbcf9d1942" }); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 2, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "58495e52-8212-49a5-929a-04a759a1eaae", "AQAAAAIAAYagAAAAEHI2wahcf8tCM2SlSfNPiluZtwp9QP2QOlom8Vc5L1FhbuZoex+1WlnhONaWtKHBZQ==", "be73a773-8c2d-4f23-9a79-cb5d106ac1d2" }); - } - } -} diff --git a/Migrations/20241125051125_UpdateManifacturerModel.Designer.cs b/Migrations/20241125051125_UpdateManifacturerModel.Designer.cs deleted file mode 100644 index be60714..0000000 --- a/Migrations/20241125051125_UpdateManifacturerModel.Designer.cs +++ /dev/null @@ -1,635 +0,0 @@ -// -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(AuthDBContext))] - [Migration("20241125051125_UpdateManifacturerModel")] - partial class UpdateManifacturerModel - { - /// - 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", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("longtext"); - - b.Property("ClaimValue") - .HasColumnType("longtext"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("longtext"); - - b.Property("ClaimValue") - .HasColumnType("longtext"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("varchar(255)"); - - b.Property("ProviderKey") - .HasColumnType("varchar(255)"); - - b.Property("ProviderDisplayName") - .HasColumnType("longtext"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - - b.HasData( - new - { - UserId = 1, - RoleId = 1 - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("LoginProvider") - .HasColumnType("varchar(255)"); - - b.Property("Name") - .HasColumnType("varchar(255)"); - - b.Property("Value") - .HasColumnType("longtext"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", b => - { - b.Property("CompanyId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CompanyId")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CompanyId"); - - b.ToTable("Companies"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.DepartmentModel", b => - { - b.Property("DepartmentId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DepartmentId")); - - b.Property("CompanyId") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("DepartmentId"); - - b.HasIndex("CompanyId"); - - b.ToTable("Departments"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", b => - { - b.Property("ItemID") - .HasColumnType("varchar(255)"); - - b.Property("CompanyId") - .HasColumnType("int"); - - b.Property("ConvertPrice") - .HasColumnType("float"); - - b.Property("Currency") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CurrencyRate") - .HasColumnType("float"); - - b.Property("DODate") - .HasColumnType("datetime(6)"); - - b.Property("DepartmentId") - .HasColumnType("int"); - - b.Property("EndWDate") - .HasColumnType("datetime(6)"); - - b.Property("InvoiceDate") - .HasColumnType("datetime(6)"); - - b.Property("PONo") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("PriceInRM") - .HasColumnType("float"); - - b.Property("ProductId") - .HasColumnType("int"); - - b.Property("PurchaseDate") - .HasColumnType("datetime(6)"); - - b.Property("Quantity") - .HasColumnType("int"); - - b.Property("SerialNumber") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Supplier") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Warranty") - .HasColumnType("int"); - - b.HasKey("ItemID"); - - b.HasIndex("CompanyId"); - - b.HasIndex("DepartmentId"); - - b.HasIndex("ProductId"); - - b.ToTable("Items"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ManufacturerModel", b => - { - b.Property("ManufacturesId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ManufacturesId")); - - b.Property("ManufacturesName") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("ManufacturesId"); - - b.ToTable("Manifacturers"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b => - { - b.Property("ProductId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductId")); - - b.Property("Category") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("CompanyId") - .HasColumnType("int"); - - b.Property("ImageProduct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Manufacturer") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ModelNo") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProductName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QuantityProduct") - .HasColumnType("int"); - - b.HasKey("ProductId"); - - b.HasIndex("CompanyId"); - - b.ToTable("Products"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.SupplierModel", b => - { - b.Property("SupplierId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierId")); - - b.Property("SupplierEmail") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplierGender") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplierName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplierPhoneNo") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SupplierId"); - - b.ToTable("Suppliers"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.ModuleSettingModel", b => - { - b.Property("SettingId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SettingId")); - - b.Property("AllowedUserType") - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("MethodAllowedUserType") - .HasColumnType("json"); - - b.Property("ModuleName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); - - b.Property("ModuleStatus") - .HasColumnType("int"); - - b.HasKey("SettingId"); - - b.ToTable("ModuleSettings"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.RoleModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("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" - }); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Models.UserModel", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("Id")); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("longtext"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("tinyint(1)"); - - b.Property("FullName") - .HasColumnType("longtext"); - - b.Property("LockoutEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("LockoutEnd") - .HasColumnType("datetime(6)"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("longtext"); - - b.Property("PhoneNumber") - .HasColumnType("longtext"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("tinyint(1)"); - - b.Property("SecurityStamp") - .HasColumnType("longtext"); - - b.Property("TwoFactorEnabled") - .HasColumnType("tinyint(1)"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); - - b.Property("UserStatus") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - - b.HasData( - new - { - Id = 1, - AccessFailedCount = 0, - ConcurrencyStamp = "0b144c73-eac3-46ed-b04c-0109e958043c", - Email = "admin@pstw.com.my", - EmailConfirmed = true, - FullName = "MAAdmin", - LockoutEnabled = false, - NormalizedEmail = "ADMIN@PSTW.COM.MY", - NormalizedUserName = "ADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAECyQRTu2SEHsnq6Qoyo4OEB8hwfTI97hruTOOWK6/DrCrOEH5th2DpYu2Bq7yUUEaQ==", - PhoneNumberConfirmed = false, - SecurityStamp = "6b2ac3ea-069b-4064-a1e5-856e6d183681", - TwoFactorEnabled = false, - UserName = "admin@pstw.com.my" - }, - new - { - Id = 2, - AccessFailedCount = 0, - ConcurrencyStamp = "4f9d5d52-9123-4715-9453-08607b43fc68", - Email = "sysadmin@pstw.com.my", - EmailConfirmed = true, - FullName = "SysAdmin", - LockoutEnabled = false, - NormalizedEmail = "SYSADMIN@PSTW.COM.MY", - NormalizedUserName = "SYSADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAEHhYutnublAEWEf49O5TXjZpXptCyJdu5sD2wVoqRbEdn0COmIYlc5IKFTfCMuDRtQ==", - PhoneNumberConfirmed = false, - SecurityStamp = "314fdbc4-826d-4ee9-8296-a90bb6fe19f5", - TwoFactorEnabled = false, - UserName = "sysadmin@pstw.com.my" - }); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("PSTW_CentralSystem.Models.RoleModel", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", 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", b => - { - b.HasOne("PSTW_CentralSystem.Models.UserModel", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.DepartmentModel", b => - { - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", "Company") - .WithMany() - .HasForeignKey("CompanyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Company"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ItemModel", b => - { - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", "Company") - .WithMany() - .HasForeignKey("CompanyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.DepartmentModel", "Department") - .WithMany() - .HasForeignKey("DepartmentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", "Product") - .WithMany() - .HasForeignKey("ProductId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Company"); - - b.Navigation("Department"); - - b.Navigation("Product"); - }); - - modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b => - { - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", "Company") - .WithMany() - .HasForeignKey("CompanyId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Company"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/Migrations/20241125051125_UpdateManifacturerModel.cs b/Migrations/20241125051125_UpdateManifacturerModel.cs deleted file mode 100644 index 45e2dfa..0000000 --- a/Migrations/20241125051125_UpdateManifacturerModel.cs +++ /dev/null @@ -1,66 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace PSTW_CentralSystem.Migrations -{ - /// - public partial class UpdateManifacturerModel : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "ManifacturerName", - table: "Manifacturers", - newName: "ManufacturesName"); - - migrationBuilder.RenameColumn( - name: "ManifacturerId", - table: "Manifacturers", - newName: "ManufacturesId"); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 1, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "0b144c73-eac3-46ed-b04c-0109e958043c", "AQAAAAIAAYagAAAAECyQRTu2SEHsnq6Qoyo4OEB8hwfTI97hruTOOWK6/DrCrOEH5th2DpYu2Bq7yUUEaQ==", "6b2ac3ea-069b-4064-a1e5-856e6d183681" }); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 2, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "4f9d5d52-9123-4715-9453-08607b43fc68", "AQAAAAIAAYagAAAAEHhYutnublAEWEf49O5TXjZpXptCyJdu5sD2wVoqRbEdn0COmIYlc5IKFTfCMuDRtQ==", "314fdbc4-826d-4ee9-8296-a90bb6fe19f5" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "ManufacturesName", - table: "Manifacturers", - newName: "ManifacturerName"); - - migrationBuilder.RenameColumn( - name: "ManufacturesId", - table: "Manifacturers", - newName: "ManifacturerId"); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 1, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "23e577cb-b26f-47e6-bd98-aa4e600a69cb", "AQAAAAIAAYagAAAAELWRmCIfyew1rUthl5tw5zCupjCBpto6hwQFo63NWL69M7cp2d1SCy7yoUll1jQqkQ==", "e12db90e-efad-4d36-b0f8-af93b665dfb6" }); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 2, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "ff24ec03-3b72-4b88-aa9a-a37f3141dd9c", "AQAAAAIAAYagAAAAENmNTZg8skbp+aJcr4tvdrPKnYmI+Hmgi0Ah/t5Jy35zKSHNX0Dhu0BBGXVLyTliSQ==", "b2365439-64e8-4ba3-a4e5-4043c0c4b0e0" }); - } - } -} diff --git a/Migrations/20241125051236_UpdateManifacturerModel2.cs b/Migrations/20241125051236_UpdateManifacturerModel2.cs deleted file mode 100644 index 8e8a48a..0000000 --- a/Migrations/20241125051236_UpdateManifacturerModel2.cs +++ /dev/null @@ -1,66 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace PSTW_CentralSystem.Migrations -{ - /// - public partial class UpdateManifacturerModel2 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "ManufacturesName", - table: "Manifacturers", - newName: "ManufacturerName"); - - migrationBuilder.RenameColumn( - name: "ManufacturesId", - table: "Manifacturers", - newName: "ManufacturerId"); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 1, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "9ea0a171-7dcc-45a5-81a7-cfcfddbfd6e0", "AQAAAAIAAYagAAAAELSRntWl5rKnYA0TnNAC7qj54A7uRTevStsdc4WkfTXLZaNG1/J55Cl6laIR9kOR2g==", "a906bafd-1a37-41ec-9e08-0e6877a05dbb" }); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 2, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "daf3b4fc-8c91-4dbe-a01a-a7eb9a9200d3", "AQAAAAIAAYagAAAAEGRrzPnCkIDxBFOc9gMn+h/xYIdjN6rQZFMd0eSMfLk8n4u9AX6791Zzw/Q8UR5Xww==", "83dcb965-0f1d-4be3-ac42-e8476daca591" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "ManufacturerName", - table: "Manifacturers", - newName: "ManufacturesName"); - - migrationBuilder.RenameColumn( - name: "ManufacturerId", - table: "Manifacturers", - newName: "ManufacturesId"); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 1, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "0b144c73-eac3-46ed-b04c-0109e958043c", "AQAAAAIAAYagAAAAECyQRTu2SEHsnq6Qoyo4OEB8hwfTI97hruTOOWK6/DrCrOEH5th2DpYu2Bq7yUUEaQ==", "6b2ac3ea-069b-4064-a1e5-856e6d183681" }); - - migrationBuilder.UpdateData( - table: "AspNetUsers", - keyColumn: "Id", - keyValue: 2, - columns: new[] { "ConcurrencyStamp", "PasswordHash", "SecurityStamp" }, - values: new object[] { "4f9d5d52-9123-4715-9453-08607b43fc68", "AQAAAAIAAYagAAAAEHhYutnublAEWEf49O5TXjZpXptCyJdu5sD2wVoqRbEdn0COmIYlc5IKFTfCMuDRtQ==", "314fdbc4-826d-4ee9-8296-a90bb6fe19f5" }); - } - } -} diff --git a/Migrations/20241125051236_UpdateManifacturerModel2.Designer.cs b/Migrations/20241126071458_Initiate.Designer.cs similarity index 95% rename from Migrations/20241125051236_UpdateManifacturerModel2.Designer.cs rename to Migrations/20241126071458_Initiate.Designer.cs index f99977f..feff262 100644 --- a/Migrations/20241125051236_UpdateManifacturerModel2.Designer.cs +++ b/Migrations/20241126071458_Initiate.Designer.cs @@ -12,8 +12,8 @@ using PSTW_CentralSystem.DBContext; namespace PSTW_CentralSystem.Migrations { [DbContext(typeof(AuthDBContext))] - [Migration("20241125051236_UpdateManifacturerModel2")] - partial class UpdateManifacturerModel2 + [Migration("20241126071458_Initiate")] + partial class Initiate { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -256,7 +256,7 @@ namespace PSTW_CentralSystem.Migrations b.HasKey("ManufacturerId"); - b.ToTable("Manifacturers"); + b.ToTable("Manufacturers"); }); modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b => @@ -271,16 +271,12 @@ namespace PSTW_CentralSystem.Migrations .IsRequired() .HasColumnType("longtext"); - b.Property("CompanyId") - .HasColumnType("int"); - b.Property("ImageProduct") .IsRequired() .HasColumnType("longtext"); - b.Property("Manufacturer") - .IsRequired() - .HasColumnType("longtext"); + b.Property("ManufacturerId") + .HasColumnType("int"); b.Property("ModelNo") .IsRequired() @@ -295,7 +291,7 @@ namespace PSTW_CentralSystem.Migrations b.HasKey("ProductId"); - b.HasIndex("CompanyId"); + b.HasIndex("ManufacturerId"); b.ToTable("Products"); }); @@ -498,16 +494,16 @@ namespace PSTW_CentralSystem.Migrations { Id = 1, AccessFailedCount = 0, - ConcurrencyStamp = "9ea0a171-7dcc-45a5-81a7-cfcfddbfd6e0", + ConcurrencyStamp = "dde44c98-793e-452c-8123-5252dc03d655", Email = "admin@pstw.com.my", EmailConfirmed = true, FullName = "MAAdmin", LockoutEnabled = false, NormalizedEmail = "ADMIN@PSTW.COM.MY", NormalizedUserName = "ADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAELSRntWl5rKnYA0TnNAC7qj54A7uRTevStsdc4WkfTXLZaNG1/J55Cl6laIR9kOR2g==", + PasswordHash = "AQAAAAIAAYagAAAAEF/vIsmJIWgsCX1cyJiM/miWN66l6UKVbXIY07eBwo/kOy6xL5olLByKrgW7MdbadQ==", PhoneNumberConfirmed = false, - SecurityStamp = "a906bafd-1a37-41ec-9e08-0e6877a05dbb", + SecurityStamp = "1e63fa4d-6a8a-4738-9036-7b51d02e1eaf", TwoFactorEnabled = false, UserName = "admin@pstw.com.my" }, @@ -515,16 +511,16 @@ namespace PSTW_CentralSystem.Migrations { Id = 2, AccessFailedCount = 0, - ConcurrencyStamp = "daf3b4fc-8c91-4dbe-a01a-a7eb9a9200d3", + ConcurrencyStamp = "b529f4f9-3426-4a74-b048-d8995fe3e647", Email = "sysadmin@pstw.com.my", EmailConfirmed = true, FullName = "SysAdmin", LockoutEnabled = false, NormalizedEmail = "SYSADMIN@PSTW.COM.MY", NormalizedUserName = "SYSADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAEGRrzPnCkIDxBFOc9gMn+h/xYIdjN6rQZFMd0eSMfLk8n4u9AX6791Zzw/Q8UR5Xww==", + PasswordHash = "AQAAAAIAAYagAAAAEIEYpwwMbS9j2l6V3fpUQONaKxCMJN3pV8rVeN3eo0iva0Bu9Jj1NIdkS4GnzvpDVw==", PhoneNumberConfirmed = false, - SecurityStamp = "83dcb965-0f1d-4be3-ac42-e8476daca591", + SecurityStamp = "065ee938-093c-4816-ad28-f2e0831a7550", TwoFactorEnabled = false, UserName = "sysadmin@pstw.com.my" }); @@ -621,13 +617,13 @@ namespace PSTW_CentralSystem.Migrations modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b => { - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", "Company") + b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ManufacturerModel", "Manufacturer") .WithMany() - .HasForeignKey("CompanyId") + .HasForeignKey("ManufacturerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("Company"); + b.Navigation("Manufacturer"); }); #pragma warning restore 612, 618 } diff --git a/Migrations/20241120071120_Initiate.cs b/Migrations/20241126071458_Initiate.cs similarity index 59% rename from Migrations/20241120071120_Initiate.cs rename to Migrations/20241126071458_Initiate.cs index 34123e7..c39f312 100644 --- a/Migrations/20241120071120_Initiate.cs +++ b/Migrations/20241126071458_Initiate.cs @@ -76,6 +76,36 @@ namespace PSTW_CentralSystem.Migrations }) .Annotation("MySql:CharSet", "utf8mb4"); + migrationBuilder.CreateTable( + name: "Companies", + columns: table => new + { + CompanyId = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_Companies", x => x.CompanyId); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "Manufacturers", + columns: table => new + { + ManufacturerId = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + ManufacturerName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_Manufacturers", x => x.ManufacturerId); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + migrationBuilder.CreateTable( name: "ModuleSettings", columns: table => new @@ -98,6 +128,27 @@ namespace PSTW_CentralSystem.Migrations }) .Annotation("MySql:CharSet", "utf8mb4"); + migrationBuilder.CreateTable( + name: "Suppliers", + columns: table => new + { + SupplierId = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + SupplierName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SupplierGender = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SupplierEmail = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SupplierPhoneNo = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_Suppliers", x => x.SupplierId); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + migrationBuilder.CreateTable( name: "AspNetRoleClaims", columns: table => new @@ -219,6 +270,108 @@ namespace PSTW_CentralSystem.Migrations }) .Annotation("MySql:CharSet", "utf8mb4"); + migrationBuilder.CreateTable( + name: "Departments", + columns: table => new + { + DepartmentId = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CompanyId = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Departments", x => x.DepartmentId); + table.ForeignKey( + name: "FK_Departments_Companies_CompanyId", + column: x => x.CompanyId, + principalTable: "Companies", + principalColumn: "CompanyId", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "Products", + columns: table => new + { + ProductId = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + ProductName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ManufacturerId = table.Column(type: "int", nullable: false), + Category = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ModelNo = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + QuantityProduct = table.Column(type: "int", nullable: false), + ImageProduct = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_Products", x => x.ProductId); + table.ForeignKey( + name: "FK_Products_Manufacturers_ManufacturerId", + column: x => x.ManufacturerId, + principalTable: "Manufacturers", + principalColumn: "ManufacturerId", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "Items", + columns: table => new + { + ItemID = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CompanyId = table.Column(type: "int", nullable: false), + DepartmentId = table.Column(type: "int", nullable: false), + ProductId = table.Column(type: "int", nullable: false), + SerialNumber = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Quantity = table.Column(type: "int", nullable: false), + Supplier = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + PurchaseDate = table.Column(type: "datetime(6)", nullable: false), + PONo = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Currency = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + PriceInRM = table.Column(type: "float", nullable: false), + CurrencyRate = table.Column(type: "float", nullable: false), + ConvertPrice = table.Column(type: "float", nullable: false), + DODate = table.Column(type: "datetime(6)", nullable: false), + Warranty = table.Column(type: "int", nullable: false), + EndWDate = table.Column(type: "datetime(6)", nullable: false), + InvoiceDate = table.Column(type: "datetime(6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Items", x => x.ItemID); + table.ForeignKey( + name: "FK_Items_Companies_CompanyId", + column: x => x.CompanyId, + principalTable: "Companies", + principalColumn: "CompanyId", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Items_Departments_DepartmentId", + column: x => x.DepartmentId, + principalTable: "Departments", + principalColumn: "DepartmentId", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Items_Products_ProductId", + column: x => x.ProductId, + principalTable: "Products", + principalColumn: "ProductId", + onDelete: ReferentialAction.Cascade); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + migrationBuilder.InsertData( table: "AspNetRoles", columns: new[] { "Id", "ConcurrencyStamp", "Description", "Name", "NormalizedName" }, @@ -235,8 +388,8 @@ namespace PSTW_CentralSystem.Migrations columns: new[] { "Id", "AccessFailedCount", "ConcurrencyStamp", "Email", "EmailConfirmed", "FullName", "LockoutEnabled", "LockoutEnd", "NormalizedEmail", "NormalizedUserName", "PasswordHash", "PhoneNumber", "PhoneNumberConfirmed", "SecurityStamp", "TwoFactorEnabled", "UserName", "UserStatus" }, values: new object[,] { - { 1, 0, "e4431078-c853-410b-8369-eba4c21937f0", "admin@pstw.com.my", true, "MAAdmin", false, null, "ADMIN@PSTW.COM.MY", "ADMIN@PSTW.COM.MY", "AQAAAAIAAYagAAAAENdEN8F2O8D9gJofhSQV6UDhcjh2+C7TvjAC+KgJMUbFJbGBNXPvOORKISb0jRhftA==", null, false, "bce6229e-4b74-4324-a89d-5f3210daccfb", false, "admin@pstw.com.my", null }, - { 2, 0, "94504423-6916-4a9e-baf2-271beb3b3f2a", "sysadmin@pstw.com.my", true, "SysAdmin", false, null, "SYSADMIN@PSTW.COM.MY", "SYSADMIN@PSTW.COM.MY", "AQAAAAIAAYagAAAAEApFYVWK3qRpzEM6jFFw5EDohJ+xHCxX2EDABsUg65pa0iA1h54wp9yf/gp2qVxvVg==", null, false, "0d07b058-1d11-40a9-875e-6631d26702cb", false, "sysadmin@pstw.com.my", null } + { 1, 0, "dde44c98-793e-452c-8123-5252dc03d655", "admin@pstw.com.my", true, "MAAdmin", false, null, "ADMIN@PSTW.COM.MY", "ADMIN@PSTW.COM.MY", "AQAAAAIAAYagAAAAEF/vIsmJIWgsCX1cyJiM/miWN66l6UKVbXIY07eBwo/kOy6xL5olLByKrgW7MdbadQ==", null, false, "1e63fa4d-6a8a-4738-9036-7b51d02e1eaf", false, "admin@pstw.com.my", null }, + { 2, 0, "b529f4f9-3426-4a74-b048-d8995fe3e647", "sysadmin@pstw.com.my", true, "SysAdmin", false, null, "SYSADMIN@PSTW.COM.MY", "SYSADMIN@PSTW.COM.MY", "AQAAAAIAAYagAAAAEIEYpwwMbS9j2l6V3fpUQONaKxCMJN3pV8rVeN3eo0iva0Bu9Jj1NIdkS4GnzvpDVw==", null, false, "065ee938-093c-4816-ad28-f2e0831a7550", false, "sysadmin@pstw.com.my", null } }); migrationBuilder.InsertData( @@ -280,6 +433,31 @@ namespace PSTW_CentralSystem.Migrations table: "AspNetUsers", column: "NormalizedUserName", unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Departments_CompanyId", + table: "Departments", + column: "CompanyId"); + + migrationBuilder.CreateIndex( + name: "IX_Items_CompanyId", + table: "Items", + column: "CompanyId"); + + migrationBuilder.CreateIndex( + name: "IX_Items_DepartmentId", + table: "Items", + column: "DepartmentId"); + + migrationBuilder.CreateIndex( + name: "IX_Items_ProductId", + table: "Items", + column: "ProductId"); + + migrationBuilder.CreateIndex( + name: "IX_Products_ManufacturerId", + table: "Products", + column: "ManufacturerId"); } /// @@ -300,14 +478,32 @@ namespace PSTW_CentralSystem.Migrations migrationBuilder.DropTable( name: "AspNetUserTokens"); + migrationBuilder.DropTable( + name: "Items"); + migrationBuilder.DropTable( name: "ModuleSettings"); + migrationBuilder.DropTable( + name: "Suppliers"); + migrationBuilder.DropTable( name: "AspNetRoles"); migrationBuilder.DropTable( name: "AspNetUsers"); + + migrationBuilder.DropTable( + name: "Departments"); + + migrationBuilder.DropTable( + name: "Products"); + + migrationBuilder.DropTable( + name: "Companies"); + + migrationBuilder.DropTable( + name: "Manufacturers"); } } } diff --git a/Migrations/AuthDBContextModelSnapshot.cs b/Migrations/AuthDBContextModelSnapshot.cs index 14dbf99..8990bb0 100644 --- a/Migrations/AuthDBContextModelSnapshot.cs +++ b/Migrations/AuthDBContextModelSnapshot.cs @@ -253,7 +253,7 @@ namespace PSTW_CentralSystem.Migrations b.HasKey("ManufacturerId"); - b.ToTable("Manifacturers"); + b.ToTable("Manufacturers"); }); modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b => @@ -268,16 +268,12 @@ namespace PSTW_CentralSystem.Migrations .IsRequired() .HasColumnType("longtext"); - b.Property("CompanyId") - .HasColumnType("int"); - b.Property("ImageProduct") .IsRequired() .HasColumnType("longtext"); - b.Property("Manufacturer") - .IsRequired() - .HasColumnType("longtext"); + b.Property("ManufacturerId") + .HasColumnType("int"); b.Property("ModelNo") .IsRequired() @@ -292,7 +288,7 @@ namespace PSTW_CentralSystem.Migrations b.HasKey("ProductId"); - b.HasIndex("CompanyId"); + b.HasIndex("ManufacturerId"); b.ToTable("Products"); }); @@ -495,16 +491,16 @@ namespace PSTW_CentralSystem.Migrations { Id = 1, AccessFailedCount = 0, - ConcurrencyStamp = "9ea0a171-7dcc-45a5-81a7-cfcfddbfd6e0", + ConcurrencyStamp = "dde44c98-793e-452c-8123-5252dc03d655", Email = "admin@pstw.com.my", EmailConfirmed = true, FullName = "MAAdmin", LockoutEnabled = false, NormalizedEmail = "ADMIN@PSTW.COM.MY", NormalizedUserName = "ADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAELSRntWl5rKnYA0TnNAC7qj54A7uRTevStsdc4WkfTXLZaNG1/J55Cl6laIR9kOR2g==", + PasswordHash = "AQAAAAIAAYagAAAAEF/vIsmJIWgsCX1cyJiM/miWN66l6UKVbXIY07eBwo/kOy6xL5olLByKrgW7MdbadQ==", PhoneNumberConfirmed = false, - SecurityStamp = "a906bafd-1a37-41ec-9e08-0e6877a05dbb", + SecurityStamp = "1e63fa4d-6a8a-4738-9036-7b51d02e1eaf", TwoFactorEnabled = false, UserName = "admin@pstw.com.my" }, @@ -512,16 +508,16 @@ namespace PSTW_CentralSystem.Migrations { Id = 2, AccessFailedCount = 0, - ConcurrencyStamp = "daf3b4fc-8c91-4dbe-a01a-a7eb9a9200d3", + ConcurrencyStamp = "b529f4f9-3426-4a74-b048-d8995fe3e647", Email = "sysadmin@pstw.com.my", EmailConfirmed = true, FullName = "SysAdmin", LockoutEnabled = false, NormalizedEmail = "SYSADMIN@PSTW.COM.MY", NormalizedUserName = "SYSADMIN@PSTW.COM.MY", - PasswordHash = "AQAAAAIAAYagAAAAEGRrzPnCkIDxBFOc9gMn+h/xYIdjN6rQZFMd0eSMfLk8n4u9AX6791Zzw/Q8UR5Xww==", + PasswordHash = "AQAAAAIAAYagAAAAEIEYpwwMbS9j2l6V3fpUQONaKxCMJN3pV8rVeN3eo0iva0Bu9Jj1NIdkS4GnzvpDVw==", PhoneNumberConfirmed = false, - SecurityStamp = "83dcb965-0f1d-4be3-ac42-e8476daca591", + SecurityStamp = "065ee938-093c-4816-ad28-f2e0831a7550", TwoFactorEnabled = false, UserName = "sysadmin@pstw.com.my" }); @@ -618,13 +614,13 @@ namespace PSTW_CentralSystem.Migrations modelBuilder.Entity("PSTW_CentralSystem.Areas.Inventory.Models.ProductModel", b => { - b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.CompanyModel", "Company") + b.HasOne("PSTW_CentralSystem.Areas.Inventory.Models.ManufacturerModel", "Manufacturer") .WithMany() - .HasForeignKey("CompanyId") + .HasForeignKey("ManufacturerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("Company"); + b.Navigation("Manufacturer"); }); #pragma warning restore 612, 618 } diff --git a/PSTW_CentralSystem.csproj b/PSTW_CentralSystem.csproj index af4e93f..4a74941 100644 --- a/PSTW_CentralSystem.csproj +++ b/PSTW_CentralSystem.csproj @@ -30,6 +30,7 @@ + diff --git a/wwwroot/Media/Inventory/Images/YSISonde1 b/wwwroot/Media/Inventory/Images/YSIS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