From ad02131d76790ed6547ec7be6433c86fb8f827d7 Mon Sep 17 00:00:00 2001 From: barhen Date: Sun, 9 Jul 2023 18:11:53 -0500 Subject: [PATCH] Server Manager part setup --- ClientManager/BiskPosContext.cs | 1172 ++++++++++++++++++++++ ClientManager/ClientManager.csproj | 9 + ServerManager/Hubs/SalesHub.cs | 18 + ServerManager/Interface/ISalesHub.cs | 7 + Shared/Models/CreditPurchase.cs | 23 + Shared/Models/CustomerAccount.cs | 27 + Shared/Models/ProductAltUnit.cs | 23 + Shared/Models/RestockLevel.cs | 17 + Shared/Models/SystemUserRole.cs | 21 + Shared/Models/TbStock.cs | 23 + Shared/Models/TblBranch.cs | 21 + Shared/Models/TblBrand.cs | 15 + Shared/Models/TblCancelledTransaction.cs | 19 + Shared/Models/TblCart.cs | 39 + Shared/Models/TblCategory.cs | 15 + Shared/Models/TblCompanyDetail.cs | 23 + Shared/Models/TblCustomer.cs | 37 + Shared/Models/TblCustomerPurchase.cs | 17 + Shared/Models/TblDeliveryDetail.cs | 21 + Shared/Models/TblDeliveryHead.cs | 27 + Shared/Models/TblDeliveryRecipient.cs | 25 + Shared/Models/TblDiscountLog.cs | 21 + Shared/Models/TblDriver.cs | 35 + Shared/Models/TblHeldTransaction.cs | 41 + Shared/Models/TblInventory.cs | 17 + Shared/Models/TblInventoryEntry.cs | 19 + Shared/Models/TblInvoice.cs | 31 + Shared/Models/TblPriceChange.cs | 21 + Shared/Models/TblProduct.cs | 33 + Shared/Models/TblTruck.cs | 21 + Shared/Models/TblTruckAssignment.cs | 21 + Shared/Models/TblTruckDriverMapping.cs | 19 + Shared/Models/TblTruckInventory.cs | 19 + Shared/Models/TblUser.cs | 35 + Shared/Models/TblUserActivity.cs | 15 + Shared/Models/UnitOfMeasure.cs | 19 + 36 files changed, 1966 insertions(+) create mode 100644 ClientManager/BiskPosContext.cs create mode 100644 ServerManager/Hubs/SalesHub.cs create mode 100644 ServerManager/Interface/ISalesHub.cs create mode 100644 Shared/Models/CreditPurchase.cs create mode 100644 Shared/Models/CustomerAccount.cs create mode 100644 Shared/Models/ProductAltUnit.cs create mode 100644 Shared/Models/RestockLevel.cs create mode 100644 Shared/Models/SystemUserRole.cs create mode 100644 Shared/Models/TbStock.cs create mode 100644 Shared/Models/TblBranch.cs create mode 100644 Shared/Models/TblBrand.cs create mode 100644 Shared/Models/TblCancelledTransaction.cs create mode 100644 Shared/Models/TblCart.cs create mode 100644 Shared/Models/TblCategory.cs create mode 100644 Shared/Models/TblCompanyDetail.cs create mode 100644 Shared/Models/TblCustomer.cs create mode 100644 Shared/Models/TblCustomerPurchase.cs create mode 100644 Shared/Models/TblDeliveryDetail.cs create mode 100644 Shared/Models/TblDeliveryHead.cs create mode 100644 Shared/Models/TblDeliveryRecipient.cs create mode 100644 Shared/Models/TblDiscountLog.cs create mode 100644 Shared/Models/TblDriver.cs create mode 100644 Shared/Models/TblHeldTransaction.cs create mode 100644 Shared/Models/TblInventory.cs create mode 100644 Shared/Models/TblInventoryEntry.cs create mode 100644 Shared/Models/TblInvoice.cs create mode 100644 Shared/Models/TblPriceChange.cs create mode 100644 Shared/Models/TblProduct.cs create mode 100644 Shared/Models/TblTruck.cs create mode 100644 Shared/Models/TblTruckAssignment.cs create mode 100644 Shared/Models/TblTruckDriverMapping.cs create mode 100644 Shared/Models/TblTruckInventory.cs create mode 100644 Shared/Models/TblUser.cs create mode 100644 Shared/Models/TblUserActivity.cs create mode 100644 Shared/Models/UnitOfMeasure.cs diff --git a/ClientManager/BiskPosContext.cs b/ClientManager/BiskPosContext.cs new file mode 100644 index 0000000..c0dc102 --- /dev/null +++ b/ClientManager/BiskPosContext.cs @@ -0,0 +1,1172 @@ +using System; +using System.Collections.Generic; +using Biskilog_Cloud.Shared.Models; +using Microsoft.EntityFrameworkCore; + +namespace ClientManager; + +public partial class BiskPosContext : DbContext +{ + public BiskPosContext() + { + } + + public BiskPosContext(DbContextOptions options) + : base(options) + { + } + + public virtual DbSet CreditPurchases { get; set; } + + public virtual DbSet CustomerAccounts { get; set; } + + public virtual DbSet ProductAltUnits { get; set; } + + public virtual DbSet RestockLevels { get; set; } + + public virtual DbSet SystemUserRoles { get; set; } + + public virtual DbSet TbStocks { get; set; } + + public virtual DbSet TblBranches { get; set; } + + public virtual DbSet TblBrands { get; set; } + + public virtual DbSet TblCancelledTransactions { get; set; } + + public virtual DbSet TblCarts { get; set; } + + public virtual DbSet TblCategories { get; set; } + + public virtual DbSet TblCompanyDetails { get; set; } + + public virtual DbSet TblCustomers { get; set; } + + public virtual DbSet TblCustomerPurchases { get; set; } + + public virtual DbSet TblDeliveryDetails { get; set; } + + public virtual DbSet TblDeliveryHeads { get; set; } + + public virtual DbSet TblDeliveryRecipients { get; set; } + + public virtual DbSet TblDiscountLogs { get; set; } + + public virtual DbSet TblDrivers { get; set; } + + public virtual DbSet TblHeldTransactions { get; set; } + + public virtual DbSet TblInventories { get; set; } + + public virtual DbSet TblInventoryEntries { get; set; } + + public virtual DbSet TblInvoices { get; set; } + + public virtual DbSet TblPriceChanges { get; set; } + + public virtual DbSet TblProducts { get; set; } + + public virtual DbSet TblTrucks { get; set; } + + public virtual DbSet TblTruckAssignments { get; set; } + + public virtual DbSet TblTruckDriverMappings { get; set; } + + public virtual DbSet TblTruckInventories { get; set; } + + public virtual DbSet TblUsers { get; set; } + + public virtual DbSet TblUserActivities { get; set; } + + public virtual DbSet UnitOfMeasures { get; set; } + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) +#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263. + => optionsBuilder.UseSqlServer("Server=BarhenVM\\SqlExpress;Database=BISK_POS;Integrated Security=True;TrustServerCertificate=true"); + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.ReceiptId); + + entity.ToTable(tb => tb.HasTrigger("trg_UpdateLastModifiedOnCreditPurchases")); + + entity.Property(e => e.ReceiptId) + .HasMaxLength(120) + .HasColumnName("receiptID"); + entity.Property(e => e.BranchId) + .HasMaxLength(10) + .IsUnicode(false) + .HasColumnName("branchID"); + entity.Property(e => e.CustomerId) + .HasMaxLength(120) + .HasColumnName("customerID"); + entity.Property(e => e.Date).HasColumnName("date"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Paid) + .HasColumnType("decimal(19, 2)") + .HasColumnName("paid"); + entity.Property(e => e.Status) + .HasMaxLength(10) + .IsUnicode(false) + .HasColumnName("status"); + entity.Property(e => e.TotalBill) + .HasColumnType("decimal(19, 2)") + .HasColumnName("totalBill"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId); + + entity.ToTable(tb => tb.HasTrigger("trg_UpdateLastModifiedOnCustomerAccounts")); + + entity.Property(e => e.CountId) + .HasMaxLength(120) + .HasColumnName("countID"); + entity.Property(e => e.Balance) + .HasColumnType("decimal(19, 2)") + .HasColumnName("balance"); + entity.Property(e => e.BranchId) + .HasMaxLength(10) + .IsUnicode(false) + .HasColumnName("branchID"); + entity.Property(e => e.Comments) + .IsUnicode(false) + .HasColumnName("comments"); + entity.Property(e => e.Credit) + .HasColumnType("decimal(19, 2)") + .HasColumnName("credit"); + entity.Property(e => e.CustomerId) + .HasMaxLength(120) + .HasColumnName("customerID"); + entity.Property(e => e.Date).HasColumnName("date"); + entity.Property(e => e.Debit) + .HasColumnType("decimal(19, 2)") + .HasColumnName("debit"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.TransactionId) + .HasMaxLength(120) + .HasColumnName("transactionID"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.DistinctiveCode).HasName("PK_ProductUnitPricing"); + + entity.ToTable("ProductAltUnit", tb => tb.HasTrigger("trg_UpdateLastModifiedOnProductAltUnit")); + + entity.Property(e => e.DistinctiveCode) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("distinctiveCode"); + entity.Property(e => e.BranchId) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("branchID"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Pcode) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("pcode"); + entity.Property(e => e.PriceUnit) + .HasColumnType("decimal(19, 2)") + .HasColumnName("price/unit"); + entity.Property(e => e.QuantityUnit).HasColumnName("quantity/unit"); + entity.Property(e => e.UnitBarcode) + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnName("unitBarcode"); + entity.Property(e => e.UnitCode) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("unitCode"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.ProductId).HasName("PK_ProductRestockLevels"); + + entity.ToTable(tb => tb.HasTrigger("trg_UpdateLastModifiedOnRestockLevels")); + + entity.Property(e => e.ProductId) + .HasMaxLength(150) + .IsUnicode(false) + .HasColumnName("productID"); + entity.Property(e => e.BranchId) + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnName("branchID"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Unit) + .HasMaxLength(150) + .IsUnicode(false) + .HasColumnName("unit"); + entity.Property(e => e.WarnLevel).HasColumnName("warnLevel"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("systemUserRoles", tb => tb.HasTrigger("trg_UpdateLastModifiedOnsystemUserRoles")); + + entity.Property(e => e.Id) + .ValueGeneratedNever() + .HasColumnName("id"); + entity.Property(e => e.Assist).HasColumnName("assist"); + entity.Property(e => e.Cashier).HasColumnName("cashier"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Manager).HasColumnName("manager"); + entity.Property(e => e.Owner).HasColumnName("owner"); + entity.Property(e => e.Roles) + .IsUnicode(false) + .HasColumnName("roles"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId); + + entity.ToTable("tbStock", tb => tb.HasTrigger("trg_UpdateLastModifiedOntbStock")); + + entity.Property(e => e.CountId) + .HasMaxLength(50) + .HasColumnName("countID"); + entity.Property(e => e.BranchId) + .HasMaxLength(12) + .HasColumnName("branchID"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Pcode) + .HasMaxLength(50) + .HasColumnName("pcode"); + entity.Property(e => e.Qty).HasColumnName("qty"); + entity.Property(e => e.Refno) + .HasMaxLength(50) + .HasColumnName("refno"); + entity.Property(e => e.Sdate) + .HasColumnType("date") + .HasColumnName("sdate"); + entity.Property(e => e.Stockinby) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("stockinby"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.BranchId); + + entity.ToTable("tblBranches", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblBranches")); + + entity.Property(e => e.BranchId) + .HasMaxLength(12) + .HasColumnName("branchID"); + entity.Property(e => e.Address) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("address"); + entity.Property(e => e.BranchName) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("branchName"); + entity.Property(e => e.BranchTelephone) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("branch_telephone"); + entity.Property(e => e.City) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("city"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.StateOrProvince) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("state_or_province"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("tblBrand", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblBrand")); + + entity.Property(e => e.Id) + .HasMaxLength(50) + .HasColumnName("id"); + entity.Property(e => e.BranchId) + .HasMaxLength(12) + .HasColumnName("branchID"); + entity.Property(e => e.Brand) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("brand"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId); + + entity.ToTable("tblCancelledTransactions", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblCancelledTransactions")); + + entity.Property(e => e.CountId) + .HasMaxLength(50) + .HasColumnName("countID"); + entity.Property(e => e.BranchId) + .HasMaxLength(50) + .HasColumnName("branchID"); + entity.Property(e => e.CancelledBy) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("cancelledBy"); + entity.Property(e => e.DateCancelled) + .HasColumnType("datetime") + .HasColumnName("dateCancelled"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Transno) + .IsUnicode(false) + .HasColumnName("transno"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId); + + entity.ToTable("tblCart", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblCart")); + + entity.Property(e => e.CountId) + .HasMaxLength(200) + .IsUnicode(false) + .HasColumnName("countID"); + entity.Property(e => e.Balance) + .HasDefaultValueSql("((0))") + .HasColumnType("decimal(19, 2)") + .HasColumnName("balance"); + entity.Property(e => e.BranchId) + .HasMaxLength(12) + .HasColumnName("branchID"); + entity.Property(e => e.Cashier) + .HasMaxLength(50) + .HasColumnName("cashier"); + entity.Property(e => e.Costprice) + .HasColumnType("decimal(19, 2)") + .HasColumnName("costprice"); + entity.Property(e => e.Date).HasColumnName("date"); + entity.Property(e => e.Id) + .HasMaxLength(50) + .HasColumnName("id"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Price) + .HasColumnType("decimal(19, 2)") + .HasColumnName("price"); + entity.Property(e => e.Quantity).HasColumnName("quantity"); + entity.Property(e => e.Status) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("status"); + entity.Property(e => e.Tendered) + .HasDefaultValueSql("((0))") + .HasColumnType("decimal(19, 2)") + .HasColumnName("tendered"); + entity.Property(e => e.Total) + .HasColumnType("decimal(19, 2)") + .HasColumnName("total"); + entity.Property(e => e.Transno).HasColumnName("transno"); + entity.Property(e => e.Unit) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("unit"); + entity.Property(e => e.ValueAddTax) + .HasColumnType("decimal(19, 2)") + .HasColumnName("valueAddTax"); + }); + + modelBuilder.Entity(entity => + { + entity.ToTable("tblCategory", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblCategory")); + + entity.Property(e => e.Id) + .HasMaxLength(50) + .HasColumnName("id"); + entity.Property(e => e.BranchId) + .HasMaxLength(12) + .HasColumnName("branchID"); + entity.Property(e => e.Category) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("category"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Tin); + + entity.ToTable("tblCompanyDetails", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblCompanyDetails")); + + entity.Property(e => e.Tin) + .HasMaxLength(60) + .HasColumnName("tin"); + entity.Property(e => e.Address) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("address"); + entity.Property(e => e.CompanyName) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("company_name"); + entity.Property(e => e.Email) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("email"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.MainTelephone) + .HasMaxLength(50) + .HasColumnName("main_telephone"); + entity.Property(e => e.Vatno) + .HasMaxLength(60) + .HasColumnName("vatno"); + entity.Property(e => e.Website) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("website"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CustomerId); + + entity.ToTable("tblCustomers", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblCustomers")); + + entity.Property(e => e.CustomerId) + .HasMaxLength(30) + .HasColumnName("customerID"); + entity.Property(e => e.Address) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("address"); + entity.Property(e => e.BranchId) + .HasMaxLength(50) + .HasColumnName("branchID"); + entity.Property(e => e.DateAdded) + .HasColumnType("date") + .HasColumnName("dateAdded"); + entity.Property(e => e.DateExit) + .HasColumnType("date") + .HasColumnName("dateExit"); + entity.Property(e => e.Email) + .HasMaxLength(50) + .HasColumnName("email"); + entity.Property(e => e.FinancialStatus) + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnName("financialStatus"); + entity.Property(e => e.Firstname) + .HasMaxLength(50) + .IsUnicode(false); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.NameKey1) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("name_key1"); + entity.Property(e => e.NameKey2) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("name_key2"); + entity.Property(e => e.Status) + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnName("status"); + entity.Property(e => e.Surname) + .HasMaxLength(50) + .IsUnicode(false); + entity.Property(e => e.Telephone) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("telephone"); + entity.Property(e => e.Tin) + .HasMaxLength(50) + .HasColumnName("tin"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId); + + entity.ToTable("tblCustomerPurchases", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblCustomerPurchases")); + + entity.Property(e => e.CountId) + .HasMaxLength(50) + .HasColumnName("countID"); + entity.Property(e => e.BranchId) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("branchID"); + entity.Property(e => e.CustomerId) + .HasMaxLength(50) + .HasColumnName("customerID"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.TransactionId) + .HasMaxLength(50) + .HasColumnName("transactionID"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId); + + entity.ToTable("tblDeliveryDetails", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblDeliveryDetails")); + + entity.Property(e => e.CountId) + .HasMaxLength(100) + .HasColumnName("countID"); + entity.Property(e => e.Cost) + .HasColumnType("decimal(19, 2)") + .HasColumnName("cost"); + entity.Property(e => e.DeliveryId) + .HasMaxLength(60) + .HasColumnName("deliveryID"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Pcode) + .HasMaxLength(60) + .HasColumnName("pcode"); + entity.Property(e => e.Quantity).HasColumnName("quantity"); + entity.Property(e => e.Unit) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("unit"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.DeliveryId); + + entity.ToTable("tblDeliveryHead", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblDeliveryHead")); + + entity.Property(e => e.DeliveryId) + .HasMaxLength(60) + .HasColumnName("deliveryID"); + entity.Property(e => e.BranchId) + .HasMaxLength(20) + .HasColumnName("branchID"); + entity.Property(e => e.CustomerId) + .HasMaxLength(60) + .HasColumnName("customerID"); + entity.Property(e => e.DateCompleted).HasColumnName("dateCompleted"); + entity.Property(e => e.DateInitiated).HasColumnName("dateInitiated"); + entity.Property(e => e.Destination) + .HasMaxLength(60) + .HasColumnName("destination"); + entity.Property(e => e.GeneratedBy) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("generatedBy"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Status) + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnName("status"); + entity.Property(e => e.TotalCost) + .HasColumnType("decimal(19, 2)") + .HasColumnName("totalCost"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.DeliveryId); + + entity.ToTable("tblDeliveryRecipients", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblDeliveryRecipients")); + + entity.Property(e => e.DeliveryId) + .HasMaxLength(60) + .HasColumnName("deliveryID"); + entity.Property(e => e.Address) + .HasMaxLength(60) + .HasColumnName("address"); + entity.Property(e => e.CustomerId) + .HasMaxLength(60) + .HasColumnName("customerID"); + entity.Property(e => e.Email) + .HasMaxLength(60) + .HasColumnName("email"); + entity.Property(e => e.FromDate) + .HasColumnType("date") + .HasColumnName("fromDate"); + entity.Property(e => e.Fullname) + .IsUnicode(false) + .HasColumnName("fullname"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Telephone) + .HasMaxLength(15) + .IsUnicode(false) + .HasColumnName("telephone"); + entity.Property(e => e.ToDate) + .HasColumnType("date") + .HasColumnName("toDate"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId); + + entity.ToTable("tblDiscountLogs", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblDiscountLogs")); + + entity.Property(e => e.CountId) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("countID"); + entity.Property(e => e.BranchId) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("branchID"); + entity.Property(e => e.Cashier) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("cashier"); + entity.Property(e => e.Date).HasColumnName("date"); + entity.Property(e => e.Discount) + .HasColumnType("decimal(19, 2)") + .HasColumnName("discount"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.ReceiptId) + .HasMaxLength(50) + .HasColumnName("receiptID"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.DriverId); + + entity.ToTable("tblDrivers", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblDrivers")); + + entity.Property(e => e.DriverId) + .HasMaxLength(50) + .HasColumnName("driverID"); + entity.Property(e => e.Address1) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("address1"); + entity.Property(e => e.Address2) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("address2"); + entity.Property(e => e.BranchId) + .HasMaxLength(50) + .HasColumnName("branchID"); + entity.Property(e => e.City) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("city"); + entity.Property(e => e.DateOfBirth) + .HasColumnType("date") + .HasColumnName("dateOfBirth"); + entity.Property(e => e.Email) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("email"); + entity.Property(e => e.Firstname) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("firstname"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Middlename) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("middlename"); + entity.Property(e => e.State) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("state"); + entity.Property(e => e.Status) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("status"); + entity.Property(e => e.Surname) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("surname"); + entity.Property(e => e.Telephone) + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnName("telephone"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId); + + entity.ToTable("tblHeldTransaction", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblHeldTransaction")); + + entity.Property(e => e.CountId) + .HasMaxLength(200) + .IsUnicode(false) + .HasColumnName("countID"); + entity.Property(e => e.BranchId) + .HasMaxLength(12) + .HasColumnName("branchID"); + entity.Property(e => e.Cashier) + .HasMaxLength(50) + .HasColumnName("cashier"); + entity.Property(e => e.Costprice) + .HasColumnType("decimal(19, 2)") + .HasColumnName("costprice"); + entity.Property(e => e.CustomerId) + .HasMaxLength(200) + .IsUnicode(false) + .HasColumnName("customerID"); + entity.Property(e => e.Date).HasColumnName("date"); + entity.Property(e => e.Discount) + .HasColumnType("decimal(19, 2)") + .HasColumnName("discount"); + entity.Property(e => e.Distinctive) + .HasMaxLength(200) + .IsUnicode(false) + .HasColumnName("distinctive"); + entity.Property(e => e.InvoiceId) + .HasMaxLength(200) + .IsUnicode(false) + .HasColumnName("invoiceID"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Price) + .HasColumnType("decimal(19, 2)") + .HasColumnName("price"); + entity.Property(e => e.ProductId) + .HasMaxLength(50) + .HasColumnName("productId"); + entity.Property(e => e.Quantity).HasColumnName("quantity"); + entity.Property(e => e.Status) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("status"); + entity.Property(e => e.Total) + .HasColumnType("decimal(19, 2)") + .HasColumnName("total"); + entity.Property(e => e.TransactionId) + .HasMaxLength(200) + .IsUnicode(false) + .HasColumnName("transactionID"); + entity.Property(e => e.Unit) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("unit"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId); + + entity.ToTable("tblInventory", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblInventory")); + + entity.Property(e => e.CountId) + .HasMaxLength(50) + .HasColumnName("countID"); + entity.Property(e => e.BranchId) + .HasMaxLength(50) + .HasColumnName("branchID"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Pcode) + .HasMaxLength(50) + .HasColumnName("pcode"); + entity.Property(e => e.Quantity).HasColumnName("quantity"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId); + + entity.ToTable("tblInventoryEntries", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblInventoryEntries")); + + entity.Property(e => e.CountId) + .HasMaxLength(120) + .HasColumnName("countID"); + entity.Property(e => e.BranchId) + .HasMaxLength(60) + .HasColumnName("branchID"); + entity.Property(e => e.Date).HasColumnName("date"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Pcode) + .HasMaxLength(50) + .HasColumnName("pcode"); + entity.Property(e => e.Quantity).HasColumnName("quantity"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId).HasName("PK_tblinvoice"); + + entity.ToTable("tblInvoice", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblInvoice")); + + entity.Property(e => e.CountId) + .HasMaxLength(50) + .HasColumnName("countID"); + entity.Property(e => e.BranchId) + .HasMaxLength(50) + .HasColumnName("branchID"); + entity.Property(e => e.DateGenerated) + .HasColumnType("date") + .HasColumnName("dateGenerated"); + entity.Property(e => e.GeneratedBy) + .HasMaxLength(50) + .HasColumnName("generatedBy"); + entity.Property(e => e.InvoiceId) + .HasMaxLength(60) + .HasColumnName("invoiceID"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Pcode) + .HasMaxLength(50) + .HasColumnName("pcode"); + entity.Property(e => e.Quantity).HasColumnName("quantity"); + entity.Property(e => e.Status) + .HasMaxLength(16) + .IsUnicode(false) + .HasColumnName("status"); + entity.Property(e => e.Totalprice) + .HasColumnType("decimal(19, 2)") + .HasColumnName("totalprice"); + entity.Property(e => e.Unit) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("unit"); + entity.Property(e => e.Unitprice) + .HasColumnType("decimal(19, 2)") + .HasColumnName("unitprice"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId); + + entity.ToTable("tblPriceChanges", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblPriceChanges")); + + entity.Property(e => e.CountId) + .HasMaxLength(70) + .HasColumnName("countID"); + entity.Property(e => e.BranchId) + .HasMaxLength(50) + .HasColumnName("branchID"); + entity.Property(e => e.ChangeDate).HasColumnName("change_date"); + entity.Property(e => e.CurrentPrice) + .HasColumnType("decimal(19, 2)") + .HasColumnName("current_price"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Pcode) + .HasMaxLength(120) + .HasColumnName("pcode"); + entity.Property(e => e.PreviousPrice) + .HasColumnType("decimal(19, 2)") + .HasColumnName("previous_price"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId); + + entity.ToTable("tblProduct", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblProduct")); + + entity.Property(e => e.CountId) + .HasMaxLength(50) + .HasColumnName("countID"); + entity.Property(e => e.Barcode) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("barcode"); + entity.Property(e => e.BaseUnit) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("baseUnit"); + entity.Property(e => e.Bid) + .HasMaxLength(50) + .HasColumnName("bid"); + entity.Property(e => e.BranchId) + .HasMaxLength(12) + .HasColumnName("branchID"); + entity.Property(e => e.Cid) + .HasMaxLength(50) + .HasColumnName("cid"); + entity.Property(e => e.Costprice) + .HasColumnType("decimal(19, 2)") + .HasColumnName("costprice"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Pcode) + .HasMaxLength(50) + .HasColumnName("pcode"); + entity.Property(e => e.Pdesc).HasColumnName("pdesc"); + entity.Property(e => e.Price) + .HasColumnType("decimal(19, 2)") + .HasColumnName("price"); + entity.Property(e => e.ProductName) + .IsUnicode(false) + .HasColumnName("product_name"); + entity.Property(e => e.Status) + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnName("status"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.TruckId); + + entity.ToTable("tblTrucks", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblTrucks")); + + entity.Property(e => e.TruckId) + .HasMaxLength(60) + .HasColumnName("truckID"); + entity.Property(e => e.BranchId) + .HasMaxLength(50) + .HasColumnName("branchID"); + entity.Property(e => e.Brand) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("brand"); + entity.Property(e => e.Driver) + .HasMaxLength(50) + .HasColumnName("driver"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.LicensePlate) + .HasMaxLength(60) + .HasColumnName("licensePlate"); + entity.Property(e => e.Weight) + .HasColumnType("decimal(19, 2)") + .HasColumnName("weight"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId); + + entity.ToTable("tblTruckAssignments", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblTruckAssignments")); + + entity.Property(e => e.CountId) + .HasMaxLength(100) + .IsUnicode(false) + .HasColumnName("countID"); + entity.Property(e => e.Cost) + .HasColumnType("decimal(19, 2)") + .HasColumnName("cost"); + entity.Property(e => e.DateAssigned).HasColumnName("dateAssigned"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.OrderId) + .HasMaxLength(50) + .HasColumnName("orderID"); + entity.Property(e => e.Status) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("status"); + entity.Property(e => e.TruckId) + .HasMaxLength(50) + .HasColumnName("truckID"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId); + + entity.ToTable("tblTruck_DriverMapping", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblTruck_DriverMapping")); + + entity.Property(e => e.CountId) + .HasMaxLength(60) + .HasColumnName("countID"); + entity.Property(e => e.DateEntry).HasColumnName("dateEntry"); + entity.Property(e => e.DriverId) + .HasMaxLength(50) + .HasColumnName("driverID"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Operation) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("operation"); + entity.Property(e => e.TruckId) + .HasMaxLength(50) + .HasColumnName("truckID"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CountId); + + entity.ToTable("tblTruckInventory", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblTruckInventory")); + + entity.Property(e => e.CountId) + .HasMaxLength(50) + .HasColumnName("countID"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Pcode) + .HasMaxLength(50) + .HasColumnName("pcode"); + entity.Property(e => e.Quantity).HasColumnName("quantity"); + entity.Property(e => e.TruckId) + .HasMaxLength(50) + .HasColumnName("truckID"); + entity.Property(e => e.Unit) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("unit"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Username); + + entity.ToTable("tblUsers", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblUsers")); + + entity.Property(e => e.Username) + .HasMaxLength(50) + .HasColumnName("username"); + entity.Property(e => e.AccessLevel) + .HasMaxLength(10) + .IsUnicode(false) + .HasColumnName("access_level"); + entity.Property(e => e.BranchId) + .HasMaxLength(50) + .HasColumnName("branchID"); + entity.Property(e => e.City) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("city"); + entity.Property(e => e.Email) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("email"); + entity.Property(e => e.Firstname) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("firstname"); + entity.Property(e => e.LastLogin).HasColumnName("last_login"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Password) + .IsUnicode(false) + .HasColumnName("password"); + entity.Property(e => e.StateOrProvince) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("state_or_province"); + entity.Property(e => e.StreetAddress1) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("street_address1"); + entity.Property(e => e.StreetAddress2) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("street_address2"); + entity.Property(e => e.Surname) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("surname"); + entity.Property(e => e.Telephone) + .HasMaxLength(15) + .IsUnicode(false) + .HasColumnName("telephone"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Username); + + entity.ToTable("tblUser_activity", tb => tb.HasTrigger("trg_UpdateLastModifiedOntblUser_activity")); + + entity.Property(e => e.Username) + .HasMaxLength(50) + .HasColumnName("username"); + entity.Property(e => e.LastActive).HasColumnName("last_active"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Workstation) + .HasMaxLength(100) + .HasColumnName("workstation"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.UnitCode); + + entity.ToTable("UnitOfMeasure", tb => tb.HasTrigger("trg_UpdateLastModifiedOnUnitOfMeasure")); + + entity.Property(e => e.UnitCode) + .HasMaxLength(120) + .HasColumnName("unitCode"); + entity.Property(e => e.BranchId) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("branchID"); + entity.Property(e => e.LastModified) + .HasDefaultValueSql("(getdate())") + .HasColumnName("last_modified"); + entity.Property(e => e.Status) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("status"); + entity.Property(e => e.Unitname) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("unitname"); + entity.Property(e => e.Unitshort) + .HasMaxLength(120) + .IsUnicode(false) + .HasColumnName("unitshort"); + }); + + OnModelCreatingPartial(modelBuilder); + } + + partial void OnModelCreatingPartial(ModelBuilder modelBuilder); +} diff --git a/ClientManager/ClientManager.csproj b/ClientManager/ClientManager.csproj index cb64f7b..0b99a7c 100644 --- a/ClientManager/ClientManager.csproj +++ b/ClientManager/ClientManager.csproj @@ -8,6 +8,7 @@ + all @@ -15,4 +16,12 @@ + + + + + + + + diff --git a/ServerManager/Hubs/SalesHub.cs b/ServerManager/Hubs/SalesHub.cs new file mode 100644 index 0000000..636bd47 --- /dev/null +++ b/ServerManager/Hubs/SalesHub.cs @@ -0,0 +1,18 @@ +using Microsoft.AspNetCore.SignalR; +using ServerManager.Interface; + +namespace ServerManager.Hubs +{ + public class SalesHub : Hub + { + public override Task OnConnectedAsync() + { + Clients. + return base.OnConnectedAsync(); + } + public async Task Publish(string a_companyId) + { + await Clients.OthersInGroup(a_companyId).AddTransaction(); + } + } +} diff --git a/ServerManager/Interface/ISalesHub.cs b/ServerManager/Interface/ISalesHub.cs new file mode 100644 index 0000000..47f8910 --- /dev/null +++ b/ServerManager/Interface/ISalesHub.cs @@ -0,0 +1,7 @@ +namespace ServerManager.Interface +{ + public interface ISalesHub + { + Task AddTransaction(); + } +} diff --git a/Shared/Models/CreditPurchase.cs b/Shared/Models/CreditPurchase.cs new file mode 100644 index 0000000..a3a9392 --- /dev/null +++ b/Shared/Models/CreditPurchase.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class CreditPurchase +{ + public string ReceiptId { get; set; } = null!; + + public DateTime? Date { get; set; } + + public decimal? Paid { get; set; } + + public decimal? TotalBill { get; set; } + + public string? CustomerId { get; set; } + + public string? Status { get; set; } + + public string? BranchId { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/CustomerAccount.cs b/Shared/Models/CustomerAccount.cs new file mode 100644 index 0000000..13bbc38 --- /dev/null +++ b/Shared/Models/CustomerAccount.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class CustomerAccount +{ + public string? CustomerId { get; set; } + + public string? TransactionId { get; set; } + + public DateTime? Date { get; set; } + + public decimal? Debit { get; set; } + + public decimal? Credit { get; set; } + + public decimal? Balance { get; set; } + + public string? Comments { get; set; } + + public string? BranchId { get; set; } + + public string CountId { get; set; } = null!; + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/ProductAltUnit.cs b/Shared/Models/ProductAltUnit.cs new file mode 100644 index 0000000..de4fc97 --- /dev/null +++ b/Shared/Models/ProductAltUnit.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class ProductAltUnit +{ + public string? Pcode { get; set; } + + public string? UnitCode { get; set; } + + public string? UnitBarcode { get; set; } + + public decimal? PriceUnit { get; set; } + + public int? QuantityUnit { get; set; } + + public string DistinctiveCode { get; set; } = null!; + + public string? BranchId { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/RestockLevel.cs b/Shared/Models/RestockLevel.cs new file mode 100644 index 0000000..988ca66 --- /dev/null +++ b/Shared/Models/RestockLevel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class RestockLevel +{ + public string ProductId { get; set; } = null!; + + public int? WarnLevel { get; set; } + + public string? Unit { get; set; } + + public string? BranchId { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/SystemUserRole.cs b/Shared/Models/SystemUserRole.cs new file mode 100644 index 0000000..dd8b06f --- /dev/null +++ b/Shared/Models/SystemUserRole.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class SystemUserRole +{ + public string? Roles { get; set; } + + public bool? Owner { get; set; } + + public bool? Manager { get; set; } + + public bool? Assist { get; set; } + + public bool? Cashier { get; set; } + + public int Id { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TbStock.cs b/Shared/Models/TbStock.cs new file mode 100644 index 0000000..951a3a9 --- /dev/null +++ b/Shared/Models/TbStock.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TbStock +{ + public string? Refno { get; set; } + + public string? Pcode { get; set; } + + public int? Qty { get; set; } + + public DateTime? Sdate { get; set; } + + public string? Stockinby { get; set; } + + public string? BranchId { get; set; } + + public string CountId { get; set; } = null!; + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblBranch.cs b/Shared/Models/TblBranch.cs new file mode 100644 index 0000000..78a5058 --- /dev/null +++ b/Shared/Models/TblBranch.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblBranch +{ + public string? BranchName { get; set; } + + public string BranchId { get; set; } = null!; + + public string? Address { get; set; } + + public string? City { get; set; } + + public string? StateOrProvince { get; set; } + + public string? BranchTelephone { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblBrand.cs b/Shared/Models/TblBrand.cs new file mode 100644 index 0000000..56201f5 --- /dev/null +++ b/Shared/Models/TblBrand.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblBrand +{ + public string Id { get; set; } = null!; + + public string? Brand { get; set; } + + public string? BranchId { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblCancelledTransaction.cs b/Shared/Models/TblCancelledTransaction.cs new file mode 100644 index 0000000..870f1c3 --- /dev/null +++ b/Shared/Models/TblCancelledTransaction.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblCancelledTransaction +{ + public string? Transno { get; set; } + + public DateTime? DateCancelled { get; set; } + + public string? CancelledBy { get; set; } + + public string? BranchId { get; set; } + + public string CountId { get; set; } = null!; + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblCart.cs b/Shared/Models/TblCart.cs new file mode 100644 index 0000000..6b84804 --- /dev/null +++ b/Shared/Models/TblCart.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblCart +{ + public string? Transno { get; set; } + + public string? Id { get; set; } + + public int? Quantity { get; set; } + + public DateTime? Date { get; set; } + + public decimal? Price { get; set; } + + public string? Cashier { get; set; } + + public string? Status { get; set; } + + public decimal? Total { get; set; } + + public string? BranchId { get; set; } + + public string? Unit { get; set; } + + public decimal? Costprice { get; set; } + + public decimal? Tendered { get; set; } + + public decimal? Balance { get; set; } + + public decimal? ValueAddTax { get; set; } + + public string CountId { get; set; } = null!; + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblCategory.cs b/Shared/Models/TblCategory.cs new file mode 100644 index 0000000..1151def --- /dev/null +++ b/Shared/Models/TblCategory.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblCategory +{ + public string Id { get; set; } = null!; + + public string? Category { get; set; } + + public string? BranchId { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblCompanyDetail.cs b/Shared/Models/TblCompanyDetail.cs new file mode 100644 index 0000000..6b6cad3 --- /dev/null +++ b/Shared/Models/TblCompanyDetail.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblCompanyDetail +{ + public string? CompanyName { get; set; } + + public string? Address { get; set; } + + public string? Website { get; set; } + + public string? Email { get; set; } + + public string Tin { get; set; } = null!; + + public string? MainTelephone { get; set; } + + public string? Vatno { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblCustomer.cs b/Shared/Models/TblCustomer.cs new file mode 100644 index 0000000..b32102b --- /dev/null +++ b/Shared/Models/TblCustomer.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblCustomer +{ + public string CustomerId { get; set; } = null!; + + public string? Firstname { get; set; } + + public string? Surname { get; set; } + + public string? Address { get; set; } + + public string? Telephone { get; set; } + + public DateTime? DateAdded { get; set; } + + public string? BranchId { get; set; } + + public string? Status { get; set; } + + public string? Tin { get; set; } + + public DateTime? DateExit { get; set; } + + public string? Email { get; set; } + + public string? FinancialStatus { get; set; } + + public string? NameKey1 { get; set; } + + public string? NameKey2 { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblCustomerPurchase.cs b/Shared/Models/TblCustomerPurchase.cs new file mode 100644 index 0000000..76c3551 --- /dev/null +++ b/Shared/Models/TblCustomerPurchase.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblCustomerPurchase +{ + public string? CustomerId { get; set; } + + public string? TransactionId { get; set; } + + public string? BranchId { get; set; } + + public string CountId { get; set; } = null!; + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblDeliveryDetail.cs b/Shared/Models/TblDeliveryDetail.cs new file mode 100644 index 0000000..8b970d9 --- /dev/null +++ b/Shared/Models/TblDeliveryDetail.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblDeliveryDetail +{ + public string? DeliveryId { get; set; } + + public string? Pcode { get; set; } + + public int? Quantity { get; set; } + + public string? Unit { get; set; } + + public decimal? Cost { get; set; } + + public string CountId { get; set; } = null!; + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblDeliveryHead.cs b/Shared/Models/TblDeliveryHead.cs new file mode 100644 index 0000000..c61a4ef --- /dev/null +++ b/Shared/Models/TblDeliveryHead.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblDeliveryHead +{ + public string DeliveryId { get; set; } = null!; + + public string? GeneratedBy { get; set; } + + public DateTime? DateInitiated { get; set; } + + public DateTime? DateCompleted { get; set; } + + public string? Destination { get; set; } + + public string? CustomerId { get; set; } + + public decimal? TotalCost { get; set; } + + public string? Status { get; set; } + + public string? BranchId { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblDeliveryRecipient.cs b/Shared/Models/TblDeliveryRecipient.cs new file mode 100644 index 0000000..5423865 --- /dev/null +++ b/Shared/Models/TblDeliveryRecipient.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblDeliveryRecipient +{ + public string DeliveryId { get; set; } = null!; + + public string? Fullname { get; set; } + + public string? Address { get; set; } + + public string? Telephone { get; set; } + + public string? Email { get; set; } + + public string? CustomerId { get; set; } + + public DateTime? FromDate { get; set; } + + public DateTime? ToDate { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblDiscountLog.cs b/Shared/Models/TblDiscountLog.cs new file mode 100644 index 0000000..d3b3e31 --- /dev/null +++ b/Shared/Models/TblDiscountLog.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblDiscountLog +{ + public string? ReceiptId { get; set; } + + public string? Cashier { get; set; } + + public DateTime? Date { get; set; } + + public decimal? Discount { get; set; } + + public string? BranchId { get; set; } + + public string CountId { get; set; } = null!; + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblDriver.cs b/Shared/Models/TblDriver.cs new file mode 100644 index 0000000..57c1b0a --- /dev/null +++ b/Shared/Models/TblDriver.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblDriver +{ + public string DriverId { get; set; } = null!; + + public string? Firstname { get; set; } + + public string? Surname { get; set; } + + public string? Middlename { get; set; } + + public DateTime? DateOfBirth { get; set; } + + public string? Address1 { get; set; } + + public string? Address2 { get; set; } + + public string? Telephone { get; set; } + + public string? Email { get; set; } + + public string? City { get; set; } + + public string? State { get; set; } + + public string? BranchId { get; set; } + + public string? Status { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblHeldTransaction.cs b/Shared/Models/TblHeldTransaction.cs new file mode 100644 index 0000000..5991e35 --- /dev/null +++ b/Shared/Models/TblHeldTransaction.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblHeldTransaction +{ + public string? ProductId { get; set; } + + public int? Quantity { get; set; } + + public DateTime? Date { get; set; } + + public decimal? Price { get; set; } + + public string? Cashier { get; set; } + + public string? Status { get; set; } + + public decimal? Total { get; set; } + + public string? BranchId { get; set; } + + public string? Unit { get; set; } + + public decimal? Costprice { get; set; } + + public decimal? Discount { get; set; } + + public string? InvoiceId { get; set; } + + public string? CustomerId { get; set; } + + public string CountId { get; set; } = null!; + + public string TransactionId { get; set; } = null!; + + public string? Distinctive { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblInventory.cs b/Shared/Models/TblInventory.cs new file mode 100644 index 0000000..2554742 --- /dev/null +++ b/Shared/Models/TblInventory.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblInventory +{ + public string? Pcode { get; set; } + + public int? Quantity { get; set; } + + public string? BranchId { get; set; } + + public string CountId { get; set; } = null!; + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblInventoryEntry.cs b/Shared/Models/TblInventoryEntry.cs new file mode 100644 index 0000000..be8fe82 --- /dev/null +++ b/Shared/Models/TblInventoryEntry.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblInventoryEntry +{ + public string? Pcode { get; set; } + + public int? Quantity { get; set; } + + public DateTime? Date { get; set; } + + public string? BranchId { get; set; } + + public string CountId { get; set; } = null!; + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblInvoice.cs b/Shared/Models/TblInvoice.cs new file mode 100644 index 0000000..faea52e --- /dev/null +++ b/Shared/Models/TblInvoice.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblInvoice +{ + public string? InvoiceId { get; set; } + + public string? Pcode { get; set; } + + public int? Quantity { get; set; } + + public decimal? Unitprice { get; set; } + + public string? Unit { get; set; } + + public decimal? Totalprice { get; set; } + + public DateTime? DateGenerated { get; set; } + + public string? Status { get; set; } + + public string? GeneratedBy { get; set; } + + public string? BranchId { get; set; } + + public string CountId { get; set; } = null!; + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblPriceChange.cs b/Shared/Models/TblPriceChange.cs new file mode 100644 index 0000000..0ebda54 --- /dev/null +++ b/Shared/Models/TblPriceChange.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblPriceChange +{ + public string? Pcode { get; set; } + + public decimal? PreviousPrice { get; set; } + + public decimal? CurrentPrice { get; set; } + + public DateTime? ChangeDate { get; set; } + + public string? BranchId { get; set; } + + public string CountId { get; set; } = null!; + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblProduct.cs b/Shared/Models/TblProduct.cs new file mode 100644 index 0000000..d1a1536 --- /dev/null +++ b/Shared/Models/TblProduct.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblProduct +{ + public string? Pcode { get; set; } + + public string? Barcode { get; set; } + + public string? Pdesc { get; set; } + + public string? Bid { get; set; } + + public string? Cid { get; set; } + + public decimal? Price { get; set; } + + public decimal? Costprice { get; set; } + + public string? BaseUnit { get; set; } + + public string? ProductName { get; set; } + + public string? BranchId { get; set; } + + public string? Status { get; set; } + + public string CountId { get; set; } = null!; + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblTruck.cs b/Shared/Models/TblTruck.cs new file mode 100644 index 0000000..853841e --- /dev/null +++ b/Shared/Models/TblTruck.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblTruck +{ + public string TruckId { get; set; } = null!; + + public string? LicensePlate { get; set; } + + public string? Brand { get; set; } + + public string? Driver { get; set; } + + public decimal? Weight { get; set; } + + public string? BranchId { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblTruckAssignment.cs b/Shared/Models/TblTruckAssignment.cs new file mode 100644 index 0000000..68a591f --- /dev/null +++ b/Shared/Models/TblTruckAssignment.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblTruckAssignment +{ + public string? OrderId { get; set; } + + public decimal? Cost { get; set; } + + public string? TruckId { get; set; } + + public string? Status { get; set; } + + public DateTime? DateAssigned { get; set; } + + public string CountId { get; set; } = null!; + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblTruckDriverMapping.cs b/Shared/Models/TblTruckDriverMapping.cs new file mode 100644 index 0000000..0ce7bdd --- /dev/null +++ b/Shared/Models/TblTruckDriverMapping.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblTruckDriverMapping +{ + public string? TruckId { get; set; } + + public string? DriverId { get; set; } + + public DateTime? DateEntry { get; set; } + + public string? Operation { get; set; } + + public string CountId { get; set; } = null!; + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblTruckInventory.cs b/Shared/Models/TblTruckInventory.cs new file mode 100644 index 0000000..a451639 --- /dev/null +++ b/Shared/Models/TblTruckInventory.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblTruckInventory +{ + public string? TruckId { get; set; } + + public string? Pcode { get; set; } + + public int? Quantity { get; set; } + + public string? Unit { get; set; } + + public string CountId { get; set; } = null!; + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblUser.cs b/Shared/Models/TblUser.cs new file mode 100644 index 0000000..01968f9 --- /dev/null +++ b/Shared/Models/TblUser.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblUser +{ + public string Username { get; set; } = null!; + + public string? Password { get; set; } + + public string? Firstname { get; set; } + + public string? Surname { get; set; } + + public string? StreetAddress1 { get; set; } + + public string? StreetAddress2 { get; set; } + + public string? City { get; set; } + + public string? StateOrProvince { get; set; } + + public string? Telephone { get; set; } + + public string? Email { get; set; } + + public string? AccessLevel { get; set; } + + public DateTime? LastLogin { get; set; } + + public string? BranchId { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/TblUserActivity.cs b/Shared/Models/TblUserActivity.cs new file mode 100644 index 0000000..cca58ff --- /dev/null +++ b/Shared/Models/TblUserActivity.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class TblUserActivity +{ + public string Username { get; set; } = null!; + + public DateTime? LastActive { get; set; } + + public string? Workstation { get; set; } + + public DateTime LastModified { get; set; } +} diff --git a/Shared/Models/UnitOfMeasure.cs b/Shared/Models/UnitOfMeasure.cs new file mode 100644 index 0000000..938afc6 --- /dev/null +++ b/Shared/Models/UnitOfMeasure.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +namespace Biskilog_Cloud.Shared.Models; + +public partial class UnitOfMeasure +{ + public string UnitCode { get; set; } = null!; + + public string? Unitname { get; set; } + + public string? Unitshort { get; set; } + + public string? Status { get; set; } + + public string? BranchId { get; set; } + + public DateTime LastModified { get; set; } +}