From 347e6094de344a56f9a4f7cdd861648ba8386432 Mon Sep 17 00:00:00 2001 From: JosephCrisostomo Date: Wed, 3 Jan 2024 13:38:15 +0800 Subject: [PATCH] Implement factories and repositories --- .../storemanagementsystemx.metadata.v7.bin | Bin 313909 -> 327894 bytes .../storemanagementsystemx.projects.v7.bin | Bin 9093708 -> 11017738 bytes .../DesignTimeBuild/.dtbcache.v2 | Bin 292667 -> 292667 bytes .vs/StoreManagementSystemX/v17/.futdcache.v2 | Bin 1593 -> 1788 bytes .vs/StoreManagementSystemX/v17/.suo | Bin 406528 -> 490496 bytes .../v17/TestStore/0/testlog.manifest | Bin 24 -> 24 bytes .../Aggregates/StockPurchaseTests.cs | 2 +- .../TransactionAggregateTests.cs | 2 +- .../UserRepositoryTests.cs | 2 +- .../DTO/PayLaterDTO.cs | 43 +++ .../DTO/ProductDBModel.cs | 38 +++ .../DTO/ProductDTO.cs | 65 ++++ .../DTO/StockPurchaseDTO.cs | 39 +++ .../DTO/StockPurchaseProductDTO.cs | 42 +++ .../DTO/TransactionDTO.cs | 32 ++ .../DTO/TransactionProductDTO.cs | 22 ++ .../DTO/UserDTO.cs | 50 +++ .../20231222160354_InitialMigrate.Designer.cs | 110 +++++++ .../20231222160354_InitialMigrate.cs | 82 +++++ ...22183826_Add transaction model.Designer.cs | 223 +++++++++++++ .../20231222183826_Add transaction model.cs | 105 ++++++ ...2190916_Make paylater optional.Designer.cs | 222 +++++++++++++ .../20231222190916_Make paylater optional.cs | 75 +++++ ...d stock purchase product model.Designer.cs | 308 ++++++++++++++++++ ...064107_Add stock purchase product model.cs | 103 ++++++ ...amoung in stock purchase table.Designer.cs | 305 +++++++++++++++++ ...ve total amoung in stock purchase table.cs | 50 +++ .../Migrations/StoreContextModelSnapshot.cs | 302 +++++++++++++++++ .../Models/PayLaterDBModel.cs | 20 ++ .../Models/StockPurchaseDBModel.cs | 26 ++ .../Models/StockPurchaseProductDBModel.cs | 28 ++ .../Models/TransactionDBModel.cs | 28 ++ .../Models/TransactionProductDBModel.cs | 30 ++ .../Models/UserDBModel.cs | 22 ++ .../Persistence/ProductRepositoryImpl.cs | 87 +++++ .../StockPurchaseRepositoryImpl.cs | 116 +++++++ .../Persistence/TransactionRepositoryImpl.cs | 158 +++++++++ .../Persistence/UserRepositoryImpl.cs | 89 +++++ .../Program.cs | 2 + .../StoreContext.cs | 59 ++++ ...oreManagementSystemX.Infrastructure.csproj | 28 ++ .../sqlite.db | Bin 0 -> 102400 bytes StoreManagementSystemX.Tests/BarcodeTests.cs | 2 +- .../PayLaterTransactionListViewModelTests.cs | 3 - StoreManagementSystemX.sln | 6 + .../Services/AuthContext.cs | 4 +- .../Services/AuthenticationService.cs | 3 +- .../Services/BarcodeGeneratorService.cs | 4 +- .../Interfaces/IProductUpdateService.cs | 3 +- .../Services/NavigationService.cs | 13 - .../Services/ProductCreationService.cs | 3 +- .../Services/ProductUpdateService.cs | 4 +- .../Services/StockPurchaseCreationService.cs | 3 +- .../Services/TransactionCreationService.cs | 3 +- .../Services/UserCreationService.cs | 3 +- .../StoreManagementSystemX.csproj | 2 +- .../ViewModels/DashboardViewModel.cs | 3 +- .../ViewModels/LoginViewModel.cs | 3 - .../ViewModels/MainViewModel.cs | 22 +- .../Products/CreateProductViewModel.cs | 2 - .../ViewModels/Products/InventoryViewModel.cs | 2 - .../Products/UpdateProductViewModel.cs | 2 - .../CreateStockPurchaseProductViewModel.cs | 3 - .../CreateStockPurchaseViewModel.cs | 4 - .../ICreateStockPurchaseProductViewModel.cs | 3 +- .../StockPurchaseListViewModel.cs | 3 - .../StockPurchaseProductViewModel.cs | 1 - .../StockPurchases/StockPurchaseViewModel.cs | 2 - .../CreateTransactionProductViewModel.cs | 3 - .../CreateTransactionViewModel.cs | 3 - .../Interfaces/ITransactionListViewModel.cs | 2 +- .../Interfaces/ITransactionRepository.cs | 19 -- .../PayLaterTransactionRowViewModel.cs | 7 +- .../PayLaterTransactionsViewModel.cs | 4 +- .../Transactions/TransactionListViewModel.cs | 2 - .../TransactionProductRowViewModel.cs | 1 - .../Transactions/TransactionRowViewModel.cs | 3 - .../ViewModels/Users/CreateUserViewModel.cs | 3 - .../Users/Interfaces/IUserRepository.cs | 18 - .../ViewModels/Users/UserListViewModel.cs | 2 - .../Products/CreateProductWindow.xaml.cs | 3 +- .../Products/UpdateProductWindow.xaml.cs | 3 +- .../CreateStockPurchaseWindow.xaml.cs | 3 +- .../CreateTransactionWindow.xaml.cs | 3 +- .../Views/Users/CreateUserWindow.xaml.cs | 4 +- .../Roots/StockPurchases/StockPurchase.cs | 51 ++- .../Aggregates/Roots/Transactions/PayLater.cs | 13 +- .../Roots/Transactions/Transaction.cs | 66 ++-- .../Roots/Users/Interfaces/IUser.cs | 4 + .../Aggregates/Roots/Users/User.cs | 2 +- .../Products/Interfaces/IProductFactory.cs | 1 + .../Interfaces/IProductReconstitutionArgs.cs | 19 ++ .../Factories/Products/ProductFactory.cs | 13 + .../Interfaces/IStockPurchaseFactory.cs | 2 + ...IStockPurchaseProductReconstitutionArgs.cs | 17 + .../IStockPurchaseReconstitutionArgs.cs | 15 + .../StockPurchases/StockPurchaseFactory.cs | 23 ++ .../Interfaces/IPayLaterFactory.cs | 2 + .../Interfaces/IPayLaterReconstitutionArgs.cs | 17 + .../Interfaces/ITransactionFactory.cs | 2 + .../ITransactionProductReconstitutionArgs.cs | 15 + .../ITransactionReconstitutionArgs.cs | 18 + .../Interfaces/PayLaterFactory.cs | 9 + .../Transactions/TransactionFactory.cs | 39 +++ .../Users/Interfaces/IUserFactory.cs | 2 + .../Interfaces/IUserReconstitutionArgs.cs | 13 + .../Factories/Users/UserFactory.cs | 15 + StoreManagementX.Domain/Program.cs | 2 +- .../Repositories/Interfaces/IRepository.cs | 3 + .../Interfaces/ITransactionRepository.cs | 2 + .../Transactions/TransactionRepository.cs | 5 + .../Barcode/BarcodeGenerationService.cs | 9 +- 112 files changed, 3268 insertions(+), 215 deletions(-) create mode 100644 StoreManagementSystemX.Infrastructure/DTO/PayLaterDTO.cs create mode 100644 StoreManagementSystemX.Infrastructure/DTO/ProductDBModel.cs create mode 100644 StoreManagementSystemX.Infrastructure/DTO/ProductDTO.cs create mode 100644 StoreManagementSystemX.Infrastructure/DTO/StockPurchaseDTO.cs create mode 100644 StoreManagementSystemX.Infrastructure/DTO/StockPurchaseProductDTO.cs create mode 100644 StoreManagementSystemX.Infrastructure/DTO/TransactionDTO.cs create mode 100644 StoreManagementSystemX.Infrastructure/DTO/TransactionProductDTO.cs create mode 100644 StoreManagementSystemX.Infrastructure/DTO/UserDTO.cs create mode 100644 StoreManagementSystemX.Infrastructure/Migrations/20231222160354_InitialMigrate.Designer.cs create mode 100644 StoreManagementSystemX.Infrastructure/Migrations/20231222160354_InitialMigrate.cs create mode 100644 StoreManagementSystemX.Infrastructure/Migrations/20231222183826_Add transaction model.Designer.cs create mode 100644 StoreManagementSystemX.Infrastructure/Migrations/20231222183826_Add transaction model.cs create mode 100644 StoreManagementSystemX.Infrastructure/Migrations/20231222190916_Make paylater optional.Designer.cs create mode 100644 StoreManagementSystemX.Infrastructure/Migrations/20231222190916_Make paylater optional.cs create mode 100644 StoreManagementSystemX.Infrastructure/Migrations/20231223064107_Add stock purchase product model.Designer.cs create mode 100644 StoreManagementSystemX.Infrastructure/Migrations/20231223064107_Add stock purchase product model.cs create mode 100644 StoreManagementSystemX.Infrastructure/Migrations/20231223070935_Remove total amoung in stock purchase table.Designer.cs create mode 100644 StoreManagementSystemX.Infrastructure/Migrations/20231223070935_Remove total amoung in stock purchase table.cs create mode 100644 StoreManagementSystemX.Infrastructure/Migrations/StoreContextModelSnapshot.cs create mode 100644 StoreManagementSystemX.Infrastructure/Models/PayLaterDBModel.cs create mode 100644 StoreManagementSystemX.Infrastructure/Models/StockPurchaseDBModel.cs create mode 100644 StoreManagementSystemX.Infrastructure/Models/StockPurchaseProductDBModel.cs create mode 100644 StoreManagementSystemX.Infrastructure/Models/TransactionDBModel.cs create mode 100644 StoreManagementSystemX.Infrastructure/Models/TransactionProductDBModel.cs create mode 100644 StoreManagementSystemX.Infrastructure/Models/UserDBModel.cs create mode 100644 StoreManagementSystemX.Infrastructure/Persistence/ProductRepositoryImpl.cs create mode 100644 StoreManagementSystemX.Infrastructure/Persistence/StockPurchaseRepositoryImpl.cs create mode 100644 StoreManagementSystemX.Infrastructure/Persistence/TransactionRepositoryImpl.cs create mode 100644 StoreManagementSystemX.Infrastructure/Persistence/UserRepositoryImpl.cs create mode 100644 StoreManagementSystemX.Infrastructure/Program.cs create mode 100644 StoreManagementSystemX.Infrastructure/StoreContext.cs create mode 100644 StoreManagementSystemX.Infrastructure/StoreManagementSystemX.Infrastructure.csproj create mode 100644 StoreManagementSystemX.Infrastructure/sqlite.db delete mode 100644 StoreManagementSystemX/ViewModels/Transactions/Interfaces/ITransactionRepository.cs delete mode 100644 StoreManagementSystemX/ViewModels/Users/Interfaces/IUserRepository.cs create mode 100644 StoreManagementX.Domain/Factories/Products/Interfaces/IProductReconstitutionArgs.cs create mode 100644 StoreManagementX.Domain/Factories/StockPurchases/Interfaces/IStockPurchaseProductReconstitutionArgs.cs create mode 100644 StoreManagementX.Domain/Factories/StockPurchases/Interfaces/IStockPurchaseReconstitutionArgs.cs create mode 100644 StoreManagementX.Domain/Factories/Transactions/Interfaces/IPayLaterReconstitutionArgs.cs create mode 100644 StoreManagementX.Domain/Factories/Transactions/Interfaces/ITransactionProductReconstitutionArgs.cs create mode 100644 StoreManagementX.Domain/Factories/Transactions/Interfaces/ITransactionReconstitutionArgs.cs create mode 100644 StoreManagementX.Domain/Factories/Users/Interfaces/IUserReconstitutionArgs.cs diff --git a/.vs/ProjectEvaluation/storemanagementsystemx.metadata.v7.bin b/.vs/ProjectEvaluation/storemanagementsystemx.metadata.v7.bin index 341dbcd505ca0d0161533f0ebe34ce01f5a07ee6..a2083a44cdd83cb2a4fcf300e72ea41e8a20ea08 100644 GIT binary patch delta 5574 zcmb7Id2kcw75DCbs!a!M3*YjA4CXM0EXkISa0J=1xol&MIg+ZtT3Q(i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|2^)+puZNwjI0ne6{bup(EdX_rp)W96NF9%sGC$aOsb~ J|E{|4?g8kqa!3FG diff --git a/.vs/StoreManagementSystemX/DesignTimeBuild/.dtbcache.v2 b/.vs/StoreManagementSystemX/DesignTimeBuild/.dtbcache.v2 index 5d19d6f094116998544297080d3c73dd40c580bb..ee7d5fb5883a765421625e5e4d2ccb9bcf93ddd4 100644 GIT binary patch delta 26006 zcmc(n2Y3`!+xIiG+1Zi=5<1cX5s)IL7f=~`@1P(krh!N&6hUwSQ9vmn2m^vhRX`MC z3!)Mtl$bed>q}d;Kkl)XB7FjZAq_#%WmRiSK>fI`K88d7`cEQ96lX53cnvg%lS~o_&q4L$0E%HWO|CvNYsXlvTFGzYwHXN|m6mJuHEsR!ae6Il&vGrr8aGPwUu%c1 zx{?-_7Rv6BH!LkVEh9NCKRG`sD>FSg3nxB1JuxRcD=#rICpj%IFEcSEDK{@YJ0~$e zKQBEmJvBE!DLXeUIXy2iDI+~XONkh66))F@lytkG9f%IJ>X@B7aqNT<`PN^$Ubj-; z{M@l)3MP)2IBDXDv18gy7+zpiG4y-1o>pr^Pqyy7PWM&+yQf8NK}09p@eeB#d1Xzj zPNW`VZ7}rdnrX%R^aShKZF(^FZ+ooe({I(fvZIA{R~_A7?QaLgJ8Wkg{$Yoyyt08c z-KVeC(yZM+eBzD;bmMRPDyibvKk}N%si~QXS($0cNvV0c!&36o67zCWle03ja*{GK zl2X%hl2fzN($iA1hNTY68=4A{^Nlwa4&rZ%x%*jhm&dkqAPtQzBPtH$FO3uj5$Vkk{OiD@1#E$Tl$;!&e zP0h^D8xJhX`7DK%08vn{BpY68ixbA_Fi~RkEP_RSJLf1eOcsE zPu=*XPu?42)m^3~EG=%_u;kcuJB|IasqgsV?MiwTp)OdK(qKODnG3~zC7!Pqeo znf4p}4~!|cvF^WXG2-5TKATHM>6NwN)~sb(C)YW%>{ZU~%)N?l4ek@hce94}!NgvD zF#l%v%i{iN@4UtuKSyhJ)v485TW?m@t6DRo^%~d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~Bk9uQ?m3h5J8oXYr-WAgF_G~Sf-%IuGJmp2D{i~wj zX-tmm5t9%zJZ?-}f@V5r{C{+2Ae;$if!SaVm<#5C`CtJ^2Ok5rAoeN346qP%!W72# zi80r6+9D+A0R@Y}60j631Ixh*uoA2SSztBD2A_c(um!l-Cz&c3-*Ei-~cE92SFh?1P+5E;5>N0-`L=Plfpe0 zI4ntjjmSlC30wwOz*X=KxCXuj*TD@?3~qv3;5%>|d=GvAcfeinBe(~C0{6ks-~o6D zO28xV82kcC`{K_N@D%(Co`L7!1^5m84*mcyK^b69zTOj4G;w44MZHUOsKF^}(0_0f z^AtMZFWd1N{GT7Q;D?X-k+WB@9+JR%NW`oC3<46{Fvn<}S80DcBefl@2yuARwcCh& z#eZ@{vN5<>u`7h_@-cSvy65=ruEvxbj9YwMB>}A0m z+X05J|HqR=Er(azP+oIyk2Scr>#z|mCF<>Y+P`veySytOdB3v$ygi1wxobjQt~}I; zG2J})Ur%v0tl!*6N#YEjX7gsc->c8Dee>GixW~Bp$MC9#J;y6$BBv%PIYRmy z3%eok)#I_>qVIJ;&rp$F+Lh=hmYk@uKl|x#FL;5&*)5*M>`}h3G+1%gr8=n#AtwhCq tIyI66$%hAvq1ILWj9P&{?j&9`c$O*iEYq0h*gsw{Q8`n-7^`ee{tu0J&U63( diff --git a/.vs/StoreManagementSystemX/v17/TestStore/0/testlog.manifest b/.vs/StoreManagementSystemX/v17/TestStore/0/testlog.manifest index e1e6d9c6f0252f67a201a067abf54320ae59aefd..199cc65ca72e31c9f9a05243c7ac7bd100a8148a 100644 GIT binary patch literal 24 bcmXR;&-W=QP7PsZU|`q_#2{efVlNK>O_K!F literal 24 bcmXR;&-W=QP7PsZU|`q)#2{dxYON0dOmYOM diff --git a/StoreManagementSystemX.Domain.Tests/Aggregates/StockPurchaseTests.cs b/StoreManagementSystemX.Domain.Tests/Aggregates/StockPurchaseTests.cs index 04d98ca..7a5bc5b 100644 --- a/StoreManagementSystemX.Domain.Tests/Aggregates/StockPurchaseTests.cs +++ b/StoreManagementSystemX.Domain.Tests/Aggregates/StockPurchaseTests.cs @@ -27,7 +27,7 @@ private IProductFactory CreateProductFactory() { IProductRepository _productRepository = new ProductRepository(); - IBarcodeGenerationService barcodeGenerationService = new BarcodeGenerationService(_productRepository); + IBarcodeGenerationService barcodeGenerationService = new BarcodeGenerationService(); IProductFactory _productFactory = new ProductFactory(barcodeGenerationService); return _productFactory; diff --git a/StoreManagementSystemX.Domain.Tests/TransactionAggregateTests.cs b/StoreManagementSystemX.Domain.Tests/TransactionAggregateTests.cs index 3b16d60..abc8a18 100644 --- a/StoreManagementSystemX.Domain.Tests/TransactionAggregateTests.cs +++ b/StoreManagementSystemX.Domain.Tests/TransactionAggregateTests.cs @@ -19,7 +19,7 @@ public class TransactionAggregateTests { private static readonly PayLaterFactory payLaterFactory = new PayLaterFactory(); private static readonly ITransactionFactory _transactionFactory = new TransactionFactory(payLaterFactory); - private static readonly IProductFactory _productFactory = new ProductFactory(new BarcodeGenerationService(new ProductRepository())); + private static readonly IProductFactory _productFactory = new ProductFactory(new BarcodeGenerationService()); private ITransaction CreateEmptyTransaction() { diff --git a/StoreManagementSystemX.Domain.Tests/UserRepositoryTests.cs b/StoreManagementSystemX.Domain.Tests/UserRepositoryTests.cs index 84f2d99..0e28c93 100644 --- a/StoreManagementSystemX.Domain.Tests/UserRepositoryTests.cs +++ b/StoreManagementSystemX.Domain.Tests/UserRepositoryTests.cs @@ -27,7 +27,7 @@ public class UserRepositoryTests private UserFactory CreateUserFactory() { var productRepository = new ProductRepository(); - var barcodeGenerationService = new BarcodeGenerationService(productRepository); + var barcodeGenerationService = new BarcodeGenerationService(); var productFactory = new ProductFactory(barcodeGenerationService); var payLaterFactory = new PayLaterFactory(); var transactionFactory = new TransactionFactory(payLaterFactory); diff --git a/StoreManagementSystemX.Infrastructure/DTO/PayLaterDTO.cs b/StoreManagementSystemX.Infrastructure/DTO/PayLaterDTO.cs new file mode 100644 index 0000000..3a1b197 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/DTO/PayLaterDTO.cs @@ -0,0 +1,43 @@ +using StoreManagementSystemX.Domain.Aggregates.Roots.Transactions.Interfaces; +using StoreManagementSystemX.Domain.Factories.Transactions.Interfaces; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.DTO +{ + public class PayLaterDTO : IPayLaterReconstitutionArgs + { + public PayLaterDTO(IPayLater payLater) + { + CustomerName = payLater.CustomerName; + IsPaid = payLater.IsPaid; + PaidAt = payLater.PaidAt; + } + + public PayLaterDTO(PayLaterDBModel payLater) + { + CustomerName = payLater.CustomerName; + IsPaid = payLater.IsPaid; + PaidAt = payLater.PaidAt; + } + + public string CustomerName { get; set; } + + public bool IsPaid { get; set; } + + public DateTime? PaidAt { get; set; } + + public PayLaterDBModel ToDBModel() + { + return new PayLaterDBModel + { + CustomerName = CustomerName, + IsPaid = IsPaid, + PaidAt = PaidAt + }; + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/DTO/ProductDBModel.cs b/StoreManagementSystemX.Infrastructure/DTO/ProductDBModel.cs new file mode 100644 index 0000000..b50a0f8 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/DTO/ProductDBModel.cs @@ -0,0 +1,38 @@ +using StoreManagementSystemX.Domain.Aggregates.Roots.Products.Interfaces; +using StoreManagementSystemX.Domain.Factories.Products.Interfaces; +using StoreManagementSystemX.Infrastructure.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.DTO +{ + public class ProductDBModel : IProductReconstitutionArgs + { + public ProductDBModel() { } + + public Guid Id { get; set; } + + public string Barcode { get; set; } = string.Empty; + + public string Name { get; set; } = string.Empty; + + public decimal CostPrice { get; set; } + + public decimal SellingPrice { get; set; } + + public int InStock { get; set; } + + public UserDBModel Creator { get; set; } = null!; + + public Guid CreatorId { get; set; } + + public List TransactionProducts { get; set; } = new List(); + + public List Transactions { get; set; } = new List(); + + public List StockPurchases { get; set; } = new List(); + } +} diff --git a/StoreManagementSystemX.Infrastructure/DTO/ProductDTO.cs b/StoreManagementSystemX.Infrastructure/DTO/ProductDTO.cs new file mode 100644 index 0000000..f3a7d7f --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/DTO/ProductDTO.cs @@ -0,0 +1,65 @@ +using StoreManagementSystemX.Domain.Aggregates.Roots.Products; +using StoreManagementSystemX.Domain.Aggregates.Roots.Products.Interfaces; +using StoreManagementSystemX.Domain.Factories.Products.Interfaces; +using StoreManagementSystemX.Infrastructure.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.DTO +{ + public class ProductDTO : IProductReconstitutionArgs + { + public ProductDTO(IProduct product) + { + Id = product.Id; + Barcode = product.Barcode; + Name = product.Name; + CostPrice = product.CostPrice; + SellingPrice = product.SellingPrice; + InStock = product.InStock; + CreatorId = product.CreatorId; + } + + public ProductDTO(ProductDBModel product) + { + Id = product.Id; + Barcode = product.Barcode; + Name = product.Name; + CostPrice = product.CostPrice; + SellingPrice = product.SellingPrice; + InStock = product.InStock; + CreatorId = product.CreatorId; + } + + public Guid Id { get; set; } + + public string Barcode { get; set; } = string.Empty; + + public string Name { get; set; } = string.Empty; + + public decimal CostPrice { get; set; } + + public decimal SellingPrice { get; set; } + + public int InStock { get; set; } + + public Guid CreatorId { get; set; } + + public ProductDBModel ToDBModel() + { + return new ProductDBModel + { + Id = Id, + Barcode = Barcode, + Name = Name, + CostPrice = CostPrice, + SellingPrice = SellingPrice, + InStock = InStock, + CreatorId = CreatorId, + }; + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/DTO/StockPurchaseDTO.cs b/StoreManagementSystemX.Infrastructure/DTO/StockPurchaseDTO.cs new file mode 100644 index 0000000..2990d93 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/DTO/StockPurchaseDTO.cs @@ -0,0 +1,39 @@ +using StoreManagementSystemX.Domain.Aggregates.Roots.StockPurchases; +using StoreManagementSystemX.Domain.Aggregates.Roots.StockPurchases.Interfaces; +using StoreManagementSystemX.Domain.Factories.StockPurchases.Interfaces; +using StoreManagementSystemX.Infrastructure.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.DTO +{ + public class StockPurchaseDTO : IStockPurchaseReconstitutionArgs + { + public StockPurchaseDTO(StockPurchaseDBModel stockPurchase, IList stockPurchaseProducts) + { + StockManagerId = stockPurchase.StockManagerId; + Id = stockPurchase.Id; + DateTime = stockPurchase.DateTime; + StockPurchaseProducts = stockPurchaseProducts; + } + + public StockPurchaseDTO(IStockPurchase stockPurchase, IEnumerable stockPurchaseProducts) + { + StockManagerId = stockPurchase.StockManagerId; + Id = stockPurchase.Id; + DateTime = stockPurchase.DateTime; + StockPurchaseProducts = stockPurchaseProducts; + } + + public Guid StockManagerId { get; } + + public Guid Id { get; } + + public DateTime DateTime { get; } + + public IEnumerable StockPurchaseProducts { get; } + } +} diff --git a/StoreManagementSystemX.Infrastructure/DTO/StockPurchaseProductDTO.cs b/StoreManagementSystemX.Infrastructure/DTO/StockPurchaseProductDTO.cs new file mode 100644 index 0000000..d891ee7 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/DTO/StockPurchaseProductDTO.cs @@ -0,0 +1,42 @@ +using StoreManagementSystemX.Domain.Aggregates.Roots.StockPurchases.Interfaces; +using StoreManagementSystemX.Domain.Factories.StockPurchases.Interfaces; +using StoreManagementSystemX.Infrastructure.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.DTO +{ + public class StockPurchaseProductDTO : IStockPurchaseProductReconstitutionArgs + { + public StockPurchaseProductDTO(StockPurchaseProductDBModel stockPurchaseProduct) + { + ProductId = stockPurchaseProduct.ProductId; + Barcode = stockPurchaseProduct.Barcode; + Name = stockPurchaseProduct.Name; + Price = stockPurchaseProduct.Price; + QuantityBought = stockPurchaseProduct.QuantityBought; + } + + public StockPurchaseProductDTO(IStockPurchaseProduct stockPurchaseProduct) + { + ProductId = stockPurchaseProduct.ProductId; + Barcode = stockPurchaseProduct.Barcode; + Name = stockPurchaseProduct.Name; + Price = stockPurchaseProduct.Price; + QuantityBought = stockPurchaseProduct.QuantityBought; + } + + public Guid ProductId { get; } + + public string Barcode { get; } + + public string Name { get; } + + public decimal Price { get; } + + public int QuantityBought { get; } + } +} diff --git a/StoreManagementSystemX.Infrastructure/DTO/TransactionDTO.cs b/StoreManagementSystemX.Infrastructure/DTO/TransactionDTO.cs new file mode 100644 index 0000000..57d3d58 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/DTO/TransactionDTO.cs @@ -0,0 +1,32 @@ +using StoreManagementSystemX.Domain.Factories.Transactions.Interfaces; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.DTO +{ + public class TransactionDTO : ITransactionReconstitutionArgs + { + public TransactionDTO(TransactionDBModel transaction, PayLaterDTO? payLater, IEnumerable transactionProducts) + { + Id = transaction.Id; + SellerId = transaction.SellerId; + DateTime = transaction.DateTime; + PayLater = payLater; + TransactionProducts = transactionProducts; + } + + public Guid SellerId { get; set; } + + public DateTime DateTime { get; set; } + + public Guid Id { get; set; } + + public IPayLaterReconstitutionArgs? PayLater { get; set; } = null!; + + public IEnumerable TransactionProducts { get; } + + } +} diff --git a/StoreManagementSystemX.Infrastructure/DTO/TransactionProductDTO.cs b/StoreManagementSystemX.Infrastructure/DTO/TransactionProductDTO.cs new file mode 100644 index 0000000..de8b28a --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/DTO/TransactionProductDTO.cs @@ -0,0 +1,22 @@ +using StoreManagementSystemX.Domain.Factories.Transactions.Interfaces; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.DTO +{ + public class TransactionProductDTO : ITransactionProductReconstitutionArgs + { + public Guid ProductId { get; set; } + + public string ProductName { get; set; } + + public decimal CostPrice { get; set; } + + public decimal SellingPrice { get; set; } + + public int QuantityBought { get; set; } + } +} diff --git a/StoreManagementSystemX.Infrastructure/DTO/UserDTO.cs b/StoreManagementSystemX.Infrastructure/DTO/UserDTO.cs new file mode 100644 index 0000000..3d83f90 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/DTO/UserDTO.cs @@ -0,0 +1,50 @@ +using StoreManagementSystemX.Domain.Aggregates.Roots.Users.Interfaces; +using StoreManagementSystemX.Domain.Factories.Users.Interfaces; +using StoreManagementSystemX.Infrastructure.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.DTO +{ + public class UserDTO : IUserReconstitutionArgs + { + + public UserDTO(IUser user) + { + Id = user.Id; + CreatorId = user.CreatorId; + Username = user.Username; + Password = user.Password; + } + + public UserDTO(UserDBModel user) + { + Id = user.Id; + CreatorId = user.CreatorId; + Username = user.Username; + Password = user.Password; + } + + public Guid Id { get; set; } + + public Guid? CreatorId { get; set; } + + public string Username { get; set; } + + public string Password { get; set; } + + public UserDBModel ToDBModel() + { + return new UserDBModel + { + Id = Id, + CreatorId = CreatorId, + Username = Username, + Password = Password, + }; + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Migrations/20231222160354_InitialMigrate.Designer.cs b/StoreManagementSystemX.Infrastructure/Migrations/20231222160354_InitialMigrate.Designer.cs new file mode 100644 index 0000000..00e11b3 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Migrations/20231222160354_InitialMigrate.Designer.cs @@ -0,0 +1,110 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using StoreManagementSystemX.Database; + +#nullable disable + +namespace StoreManagementSystemX.Infrastructure.Migrations +{ + [DbContext(typeof(StoreContext))] + [Migration("20231222160354_InitialMigrate")] + partial class InitialMigrate + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.0"); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDTO", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Barcode") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("CostPrice") + .HasColumnType("TEXT"); + + b.Property("CreatorId") + .HasColumnType("TEXT"); + + b.Property("InStock") + .HasColumnType("INTEGER"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("SellingPrice") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.ToTable("Products"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.UserDTO", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreatorId") + .HasColumnType("TEXT"); + + b.Property("Password") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Username") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.ToTable("Users"); + + b.HasData( + new + { + Id = new Guid("c1a51ff5-e8c0-45a2-8061-d4badb8aa42f"), + Password = "password", + Username = "admin" + }); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDTO", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.UserDTO", "Creator") + .WithMany() + .HasForeignKey("CreatorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Creator"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.UserDTO", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.UserDTO", "Creator") + .WithMany() + .HasForeignKey("CreatorId"); + + b.Navigation("Creator"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Migrations/20231222160354_InitialMigrate.cs b/StoreManagementSystemX.Infrastructure/Migrations/20231222160354_InitialMigrate.cs new file mode 100644 index 0000000..172e03c --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Migrations/20231222160354_InitialMigrate.cs @@ -0,0 +1,82 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace StoreManagementSystemX.Infrastructure.Migrations +{ + /// + public partial class InitialMigrate : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Users", + columns: table => new + { + Id = table.Column(type: "TEXT", nullable: false), + CreatorId = table.Column(type: "TEXT", nullable: true), + Username = table.Column(type: "TEXT", nullable: false), + Password = table.Column(type: "TEXT", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Users", x => x.Id); + table.ForeignKey( + name: "FK_Users_Users_CreatorId", + column: x => x.CreatorId, + principalTable: "Users", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "Products", + columns: table => new + { + Id = table.Column(type: "TEXT", nullable: false), + Barcode = table.Column(type: "TEXT", nullable: false), + Name = table.Column(type: "TEXT", nullable: false), + CostPrice = table.Column(type: "TEXT", nullable: false), + SellingPrice = table.Column(type: "TEXT", nullable: false), + InStock = table.Column(type: "INTEGER", nullable: false), + CreatorId = table.Column(type: "TEXT", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Products", x => x.Id); + table.ForeignKey( + name: "FK_Products_Users_CreatorId", + column: x => x.CreatorId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.InsertData( + table: "Users", + columns: new[] { "Id", "CreatorId", "Password", "Username" }, + values: new object[] { new Guid("c1a51ff5-e8c0-45a2-8061-d4badb8aa42f"), null, "password", "admin" }); + + migrationBuilder.CreateIndex( + name: "IX_Products_CreatorId", + table: "Products", + column: "CreatorId"); + + migrationBuilder.CreateIndex( + name: "IX_Users_CreatorId", + table: "Users", + column: "CreatorId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Products"); + + migrationBuilder.DropTable( + name: "Users"); + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Migrations/20231222183826_Add transaction model.Designer.cs b/StoreManagementSystemX.Infrastructure/Migrations/20231222183826_Add transaction model.Designer.cs new file mode 100644 index 0000000..f20b1f6 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Migrations/20231222183826_Add transaction model.Designer.cs @@ -0,0 +1,223 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using StoreManagementSystemX.Database; + +#nullable disable + +namespace StoreManagementSystemX.Infrastructure.Migrations +{ + [DbContext(typeof(StoreContext))] + [Migration("20231222183826_Add transaction model")] + partial class Addtransactionmodel + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.0"); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDTO", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Barcode") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("CostPrice") + .HasColumnType("TEXT"); + + b.Property("CreatorId") + .HasColumnType("TEXT"); + + b.Property("InStock") + .HasColumnType("INTEGER"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("SellingPrice") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.ToTable("Products"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("DateTime") + .HasColumnType("TEXT"); + + b.Property("SellerId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("SellerId"); + + b.ToTable("Transactions"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionProductDBModel", b => + { + b.Property("ProductId") + .HasColumnType("TEXT"); + + b.Property("TransactionId") + .HasColumnType("TEXT"); + + b.Property("CostPrice") + .HasColumnType("TEXT"); + + b.Property("ProductName") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("QuantityBought") + .HasColumnType("INTEGER"); + + b.Property("SellingPrice") + .HasColumnType("TEXT"); + + b.HasKey("ProductId", "TransactionId"); + + b.HasIndex("TransactionId"); + + b.ToTable("TransactionProducts"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.UserDTO", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreatorId") + .HasColumnType("TEXT"); + + b.Property("Password") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Username") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.ToTable("Users"); + + b.HasData( + new + { + Id = new Guid("45289878-b6fa-4af7-8fba-3258d2f354ac"), + Password = "password", + Username = "admin" + }); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDTO", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.UserDTO", "Creator") + .WithMany() + .HasForeignKey("CreatorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Creator"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.UserDTO", "Seller") + .WithMany() + .HasForeignKey("SellerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsOne("StoreManagementSystemX.Infrastructure.DTO.PayLaterDBModel", "PayLater", b1 => + { + b1.Property("TransactionDBModelId") + .HasColumnType("TEXT"); + + b1.Property("CustomerName") + .IsRequired() + .HasColumnType("TEXT"); + + b1.Property("IsPaid") + .HasColumnType("INTEGER"); + + b1.Property("PaidAt") + .HasColumnType("TEXT"); + + b1.HasKey("TransactionDBModelId"); + + b1.ToTable("Transactions"); + + b1.WithOwner() + .HasForeignKey("TransactionDBModelId"); + }); + + b.Navigation("PayLater") + .IsRequired(); + + b.Navigation("Seller"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionProductDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.ProductDTO", "Product") + .WithMany("TransactionProducts") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", "Transaction") + .WithMany("TransactionProducts") + .HasForeignKey("TransactionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("Transaction"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.UserDTO", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.UserDTO", "Creator") + .WithMany() + .HasForeignKey("CreatorId"); + + b.Navigation("Creator"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDTO", b => + { + b.Navigation("TransactionProducts"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", b => + { + b.Navigation("TransactionProducts"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Migrations/20231222183826_Add transaction model.cs b/StoreManagementSystemX.Infrastructure/Migrations/20231222183826_Add transaction model.cs new file mode 100644 index 0000000..1a0a10e --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Migrations/20231222183826_Add transaction model.cs @@ -0,0 +1,105 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace StoreManagementSystemX.Infrastructure.Migrations +{ + /// + public partial class Addtransactionmodel : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "Users", + keyColumn: "Id", + keyValue: new Guid("c1a51ff5-e8c0-45a2-8061-d4badb8aa42f")); + + migrationBuilder.CreateTable( + name: "Transactions", + columns: table => new + { + Id = table.Column(type: "TEXT", nullable: false), + SellerId = table.Column(type: "TEXT", nullable: false), + DateTime = table.Column(type: "TEXT", nullable: false), + PayLater_CustomerName = table.Column(type: "TEXT", nullable: false), + PayLater_IsPaid = table.Column(type: "INTEGER", nullable: false), + PayLater_PaidAt = table.Column(type: "TEXT", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Transactions", x => x.Id); + table.ForeignKey( + name: "FK_Transactions_Users_SellerId", + column: x => x.SellerId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "TransactionProducts", + columns: table => new + { + TransactionId = table.Column(type: "TEXT", nullable: false), + ProductId = table.Column(type: "TEXT", nullable: false), + ProductName = table.Column(type: "TEXT", nullable: false), + CostPrice = table.Column(type: "TEXT", nullable: false), + SellingPrice = table.Column(type: "TEXT", nullable: false), + QuantityBought = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TransactionProducts", x => new { x.ProductId, x.TransactionId }); + table.ForeignKey( + name: "FK_TransactionProducts_Products_ProductId", + column: x => x.ProductId, + principalTable: "Products", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_TransactionProducts_Transactions_TransactionId", + column: x => x.TransactionId, + principalTable: "Transactions", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.InsertData( + table: "Users", + columns: new[] { "Id", "CreatorId", "Password", "Username" }, + values: new object[] { new Guid("45289878-b6fa-4af7-8fba-3258d2f354ac"), null, "password", "admin" }); + + migrationBuilder.CreateIndex( + name: "IX_TransactionProducts_TransactionId", + table: "TransactionProducts", + column: "TransactionId"); + + migrationBuilder.CreateIndex( + name: "IX_Transactions_SellerId", + table: "Transactions", + column: "SellerId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "TransactionProducts"); + + migrationBuilder.DropTable( + name: "Transactions"); + + migrationBuilder.DeleteData( + table: "Users", + keyColumn: "Id", + keyValue: new Guid("45289878-b6fa-4af7-8fba-3258d2f354ac")); + + migrationBuilder.InsertData( + table: "Users", + columns: new[] { "Id", "CreatorId", "Password", "Username" }, + values: new object[] { new Guid("c1a51ff5-e8c0-45a2-8061-d4badb8aa42f"), null, "password", "admin" }); + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Migrations/20231222190916_Make paylater optional.Designer.cs b/StoreManagementSystemX.Infrastructure/Migrations/20231222190916_Make paylater optional.Designer.cs new file mode 100644 index 0000000..d2f3358 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Migrations/20231222190916_Make paylater optional.Designer.cs @@ -0,0 +1,222 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using StoreManagementSystemX.Database; + +#nullable disable + +namespace StoreManagementSystemX.Infrastructure.Migrations +{ + [DbContext(typeof(StoreContext))] + [Migration("20231222190916_Make paylater optional")] + partial class Makepaylateroptional + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.0"); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDTO", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Barcode") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("CostPrice") + .HasColumnType("TEXT"); + + b.Property("CreatorId") + .HasColumnType("TEXT"); + + b.Property("InStock") + .HasColumnType("INTEGER"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("SellingPrice") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.ToTable("Products"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("DateTime") + .HasColumnType("TEXT"); + + b.Property("SellerId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("SellerId"); + + b.ToTable("Transactions"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionProductDBModel", b => + { + b.Property("ProductId") + .HasColumnType("TEXT"); + + b.Property("TransactionId") + .HasColumnType("TEXT"); + + b.Property("CostPrice") + .HasColumnType("TEXT"); + + b.Property("ProductName") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("QuantityBought") + .HasColumnType("INTEGER"); + + b.Property("SellingPrice") + .HasColumnType("TEXT"); + + b.HasKey("ProductId", "TransactionId"); + + b.HasIndex("TransactionId"); + + b.ToTable("TransactionProducts"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.UserDTO", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreatorId") + .HasColumnType("TEXT"); + + b.Property("Password") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Username") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.ToTable("Users"); + + b.HasData( + new + { + Id = new Guid("cf4a8a7a-37cd-408b-817f-d54570050ce3"), + Password = "password", + Username = "admin" + }); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDTO", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.UserDTO", "Creator") + .WithMany() + .HasForeignKey("CreatorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Creator"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.UserDTO", "Seller") + .WithMany() + .HasForeignKey("SellerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsOne("StoreManagementSystemX.Infrastructure.DTO.PayLaterDBModel", "PayLater", b1 => + { + b1.Property("TransactionDBModelId") + .HasColumnType("TEXT"); + + b1.Property("CustomerName") + .IsRequired() + .HasColumnType("TEXT"); + + b1.Property("IsPaid") + .HasColumnType("INTEGER"); + + b1.Property("PaidAt") + .HasColumnType("TEXT"); + + b1.HasKey("TransactionDBModelId"); + + b1.ToTable("Transactions"); + + b1.WithOwner() + .HasForeignKey("TransactionDBModelId"); + }); + + b.Navigation("PayLater"); + + b.Navigation("Seller"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionProductDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.ProductDTO", "Product") + .WithMany("TransactionProducts") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", "Transaction") + .WithMany("TransactionProducts") + .HasForeignKey("TransactionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("Transaction"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.UserDTO", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.UserDTO", "Creator") + .WithMany() + .HasForeignKey("CreatorId"); + + b.Navigation("Creator"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDTO", b => + { + b.Navigation("TransactionProducts"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", b => + { + b.Navigation("TransactionProducts"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Migrations/20231222190916_Make paylater optional.cs b/StoreManagementSystemX.Infrastructure/Migrations/20231222190916_Make paylater optional.cs new file mode 100644 index 0000000..00ac602 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Migrations/20231222190916_Make paylater optional.cs @@ -0,0 +1,75 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace StoreManagementSystemX.Infrastructure.Migrations +{ + /// + public partial class Makepaylateroptional : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "Users", + keyColumn: "Id", + keyValue: new Guid("45289878-b6fa-4af7-8fba-3258d2f354ac")); + + migrationBuilder.AlterColumn( + name: "PayLater_IsPaid", + table: "Transactions", + type: "INTEGER", + nullable: true, + oldClrType: typeof(bool), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "PayLater_CustomerName", + table: "Transactions", + type: "TEXT", + nullable: true, + oldClrType: typeof(string), + oldType: "TEXT"); + + migrationBuilder.InsertData( + table: "Users", + columns: new[] { "Id", "CreatorId", "Password", "Username" }, + values: new object[] { new Guid("cf4a8a7a-37cd-408b-817f-d54570050ce3"), null, "password", "admin" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "Users", + keyColumn: "Id", + keyValue: new Guid("cf4a8a7a-37cd-408b-817f-d54570050ce3")); + + migrationBuilder.AlterColumn( + name: "PayLater_IsPaid", + table: "Transactions", + type: "INTEGER", + nullable: false, + defaultValue: false, + oldClrType: typeof(bool), + oldType: "INTEGER", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PayLater_CustomerName", + table: "Transactions", + type: "TEXT", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "TEXT", + oldNullable: true); + + migrationBuilder.InsertData( + table: "Users", + columns: new[] { "Id", "CreatorId", "Password", "Username" }, + values: new object[] { new Guid("45289878-b6fa-4af7-8fba-3258d2f354ac"), null, "password", "admin" }); + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Migrations/20231223064107_Add stock purchase product model.Designer.cs b/StoreManagementSystemX.Infrastructure/Migrations/20231223064107_Add stock purchase product model.Designer.cs new file mode 100644 index 0000000..6b66175 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Migrations/20231223064107_Add stock purchase product model.Designer.cs @@ -0,0 +1,308 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using StoreManagementSystemX.Database; + +#nullable disable + +namespace StoreManagementSystemX.Infrastructure.Migrations +{ + [DbContext(typeof(StoreContext))] + [Migration("20231223064107_Add stock purchase product model")] + partial class Addstockpurchaseproductmodel + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.0"); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDBModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Barcode") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("CostPrice") + .HasColumnType("TEXT"); + + b.Property("CreatorId") + .HasColumnType("TEXT"); + + b.Property("InStock") + .HasColumnType("INTEGER"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("SellingPrice") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.ToTable("Products"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("DateTime") + .HasColumnType("TEXT"); + + b.Property("SellerId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("SellerId"); + + b.ToTable("Transactions"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionProductDBModel", b => + { + b.Property("ProductId") + .HasColumnType("TEXT"); + + b.Property("TransactionId") + .HasColumnType("TEXT"); + + b.Property("CostPrice") + .HasColumnType("TEXT"); + + b.Property("ProductName") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("QuantityBought") + .HasColumnType("INTEGER"); + + b.Property("SellingPrice") + .HasColumnType("TEXT"); + + b.HasKey("ProductId", "TransactionId"); + + b.HasIndex("TransactionId"); + + b.ToTable("TransactionProducts"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.StockPurchaseDBModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("DateTime") + .HasColumnType("TEXT"); + + b.Property("StockManagerId") + .HasColumnType("TEXT"); + + b.Property("TotalAmount") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("StockManagerId"); + + b.ToTable("StockPurchaseDBModel"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.StockPurchaseProductDBModel", b => + { + b.Property("ProductId") + .HasColumnType("TEXT"); + + b.Property("StockPurchaseId") + .HasColumnType("TEXT"); + + b.Property("Barcode") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Price") + .HasColumnType("TEXT"); + + b.Property("QuantityBought") + .HasColumnType("INTEGER"); + + b.HasKey("ProductId", "StockPurchaseId"); + + b.HasIndex("StockPurchaseId"); + + b.ToTable("StockPurchaseProductDBModel"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.UserDBModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreatorId") + .HasColumnType("TEXT"); + + b.Property("Password") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Username") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.ToTable("Users"); + + b.HasData( + new + { + Id = new Guid("6f765d6c-93a3-4666-b862-cdde776c0814"), + Password = "password", + Username = "admin" + }); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.Models.UserDBModel", "Creator") + .WithMany() + .HasForeignKey("CreatorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Creator"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.Models.UserDBModel", "Seller") + .WithMany() + .HasForeignKey("SellerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsOne("StoreManagementSystemX.Infrastructure.DTO.PayLaterDBModel", "PayLater", b1 => + { + b1.Property("TransactionDBModelId") + .HasColumnType("TEXT"); + + b1.Property("CustomerName") + .IsRequired() + .HasColumnType("TEXT"); + + b1.Property("IsPaid") + .HasColumnType("INTEGER"); + + b1.Property("PaidAt") + .HasColumnType("TEXT"); + + b1.HasKey("TransactionDBModelId"); + + b1.ToTable("Transactions"); + + b1.WithOwner() + .HasForeignKey("TransactionDBModelId"); + }); + + b.Navigation("PayLater"); + + b.Navigation("Seller"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionProductDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.ProductDBModel", "Product") + .WithMany("TransactionProducts") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", "Transaction") + .WithMany("TransactionProducts") + .HasForeignKey("TransactionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("Transaction"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.StockPurchaseDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.Models.UserDBModel", "StockManager") + .WithMany() + .HasForeignKey("StockManagerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("StockManager"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.StockPurchaseProductDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.ProductDBModel", "Product") + .WithMany() + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("StoreManagementSystemX.Infrastructure.Models.StockPurchaseDBModel", "StockPurchase") + .WithMany("StockPurchaseProducts") + .HasForeignKey("StockPurchaseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("StockPurchase"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.UserDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.Models.UserDBModel", "Creator") + .WithMany() + .HasForeignKey("CreatorId"); + + b.Navigation("Creator"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDBModel", b => + { + b.Navigation("TransactionProducts"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", b => + { + b.Navigation("TransactionProducts"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.StockPurchaseDBModel", b => + { + b.Navigation("StockPurchaseProducts"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Migrations/20231223064107_Add stock purchase product model.cs b/StoreManagementSystemX.Infrastructure/Migrations/20231223064107_Add stock purchase product model.cs new file mode 100644 index 0000000..6acd9ba --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Migrations/20231223064107_Add stock purchase product model.cs @@ -0,0 +1,103 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace StoreManagementSystemX.Infrastructure.Migrations +{ + /// + public partial class Addstockpurchaseproductmodel : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "Users", + keyColumn: "Id", + keyValue: new Guid("cf4a8a7a-37cd-408b-817f-d54570050ce3")); + + migrationBuilder.CreateTable( + name: "StockPurchaseDBModel", + columns: table => new + { + Id = table.Column(type: "TEXT", nullable: false), + StockManagerId = table.Column(type: "TEXT", nullable: false), + DateTime = table.Column(type: "TEXT", nullable: false), + TotalAmount = table.Column(type: "TEXT", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_StockPurchaseDBModel", x => x.Id); + table.ForeignKey( + name: "FK_StockPurchaseDBModel_Users_StockManagerId", + column: x => x.StockManagerId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "StockPurchaseProductDBModel", + columns: table => new + { + StockPurchaseId = table.Column(type: "TEXT", nullable: false), + ProductId = table.Column(type: "TEXT", nullable: false), + Barcode = table.Column(type: "TEXT", nullable: false), + Name = table.Column(type: "TEXT", nullable: false), + Price = table.Column(type: "TEXT", nullable: false), + QuantityBought = table.Column(type: "INTEGER", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_StockPurchaseProductDBModel", x => new { x.ProductId, x.StockPurchaseId }); + table.ForeignKey( + name: "FK_StockPurchaseProductDBModel_Products_ProductId", + column: x => x.ProductId, + principalTable: "Products", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_StockPurchaseProductDBModel_StockPurchaseDBModel_StockPurchaseId", + column: x => x.StockPurchaseId, + principalTable: "StockPurchaseDBModel", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.InsertData( + table: "Users", + columns: new[] { "Id", "CreatorId", "Password", "Username" }, + values: new object[] { new Guid("6f765d6c-93a3-4666-b862-cdde776c0814"), null, "password", "admin" }); + + migrationBuilder.CreateIndex( + name: "IX_StockPurchaseDBModel_StockManagerId", + table: "StockPurchaseDBModel", + column: "StockManagerId"); + + migrationBuilder.CreateIndex( + name: "IX_StockPurchaseProductDBModel_StockPurchaseId", + table: "StockPurchaseProductDBModel", + column: "StockPurchaseId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "StockPurchaseProductDBModel"); + + migrationBuilder.DropTable( + name: "StockPurchaseDBModel"); + + migrationBuilder.DeleteData( + table: "Users", + keyColumn: "Id", + keyValue: new Guid("6f765d6c-93a3-4666-b862-cdde776c0814")); + + migrationBuilder.InsertData( + table: "Users", + columns: new[] { "Id", "CreatorId", "Password", "Username" }, + values: new object[] { new Guid("cf4a8a7a-37cd-408b-817f-d54570050ce3"), null, "password", "admin" }); + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Migrations/20231223070935_Remove total amoung in stock purchase table.Designer.cs b/StoreManagementSystemX.Infrastructure/Migrations/20231223070935_Remove total amoung in stock purchase table.Designer.cs new file mode 100644 index 0000000..fa80ba0 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Migrations/20231223070935_Remove total amoung in stock purchase table.Designer.cs @@ -0,0 +1,305 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using StoreManagementSystemX.Database; + +#nullable disable + +namespace StoreManagementSystemX.Infrastructure.Migrations +{ + [DbContext(typeof(StoreContext))] + [Migration("20231223070935_Remove total amoung in stock purchase table")] + partial class Removetotalamounginstockpurchasetable + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.0"); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDBModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Barcode") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("CostPrice") + .HasColumnType("TEXT"); + + b.Property("CreatorId") + .HasColumnType("TEXT"); + + b.Property("InStock") + .HasColumnType("INTEGER"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("SellingPrice") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.ToTable("Products"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("DateTime") + .HasColumnType("TEXT"); + + b.Property("SellerId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("SellerId"); + + b.ToTable("Transactions"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionProductDBModel", b => + { + b.Property("ProductId") + .HasColumnType("TEXT"); + + b.Property("TransactionId") + .HasColumnType("TEXT"); + + b.Property("CostPrice") + .HasColumnType("TEXT"); + + b.Property("ProductName") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("QuantityBought") + .HasColumnType("INTEGER"); + + b.Property("SellingPrice") + .HasColumnType("TEXT"); + + b.HasKey("ProductId", "TransactionId"); + + b.HasIndex("TransactionId"); + + b.ToTable("TransactionProducts"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.StockPurchaseDBModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("DateTime") + .HasColumnType("TEXT"); + + b.Property("StockManagerId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("StockManagerId"); + + b.ToTable("StockPurchaseDBModel"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.StockPurchaseProductDBModel", b => + { + b.Property("ProductId") + .HasColumnType("TEXT"); + + b.Property("StockPurchaseId") + .HasColumnType("TEXT"); + + b.Property("Barcode") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Price") + .HasColumnType("TEXT"); + + b.Property("QuantityBought") + .HasColumnType("INTEGER"); + + b.HasKey("ProductId", "StockPurchaseId"); + + b.HasIndex("StockPurchaseId"); + + b.ToTable("StockPurchaseProductDBModel"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.UserDBModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreatorId") + .HasColumnType("TEXT"); + + b.Property("Password") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Username") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.ToTable("Users"); + + b.HasData( + new + { + Id = new Guid("6b05b739-d2fc-4616-ad3a-1e476c690ff5"), + Password = "password", + Username = "admin" + }); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.Models.UserDBModel", "Creator") + .WithMany() + .HasForeignKey("CreatorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Creator"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.Models.UserDBModel", "Seller") + .WithMany() + .HasForeignKey("SellerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsOne("StoreManagementSystemX.Infrastructure.DTO.PayLaterDBModel", "PayLater", b1 => + { + b1.Property("TransactionDBModelId") + .HasColumnType("TEXT"); + + b1.Property("CustomerName") + .IsRequired() + .HasColumnType("TEXT"); + + b1.Property("IsPaid") + .HasColumnType("INTEGER"); + + b1.Property("PaidAt") + .HasColumnType("TEXT"); + + b1.HasKey("TransactionDBModelId"); + + b1.ToTable("Transactions"); + + b1.WithOwner() + .HasForeignKey("TransactionDBModelId"); + }); + + b.Navigation("PayLater"); + + b.Navigation("Seller"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionProductDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.ProductDBModel", "Product") + .WithMany("TransactionProducts") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", "Transaction") + .WithMany("TransactionProducts") + .HasForeignKey("TransactionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("Transaction"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.StockPurchaseDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.Models.UserDBModel", "StockManager") + .WithMany() + .HasForeignKey("StockManagerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("StockManager"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.StockPurchaseProductDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.ProductDBModel", "Product") + .WithMany() + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("StoreManagementSystemX.Infrastructure.Models.StockPurchaseDBModel", "StockPurchase") + .WithMany("StockPurchaseProducts") + .HasForeignKey("StockPurchaseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("StockPurchase"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.UserDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.Models.UserDBModel", "Creator") + .WithMany() + .HasForeignKey("CreatorId"); + + b.Navigation("Creator"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDBModel", b => + { + b.Navigation("TransactionProducts"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", b => + { + b.Navigation("TransactionProducts"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.StockPurchaseDBModel", b => + { + b.Navigation("StockPurchaseProducts"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Migrations/20231223070935_Remove total amoung in stock purchase table.cs b/StoreManagementSystemX.Infrastructure/Migrations/20231223070935_Remove total amoung in stock purchase table.cs new file mode 100644 index 0000000..78e5368 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Migrations/20231223070935_Remove total amoung in stock purchase table.cs @@ -0,0 +1,50 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace StoreManagementSystemX.Infrastructure.Migrations +{ + /// + public partial class Removetotalamounginstockpurchasetable : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "Users", + keyColumn: "Id", + keyValue: new Guid("6f765d6c-93a3-4666-b862-cdde776c0814")); + + migrationBuilder.DropColumn( + name: "TotalAmount", + table: "StockPurchaseDBModel"); + + migrationBuilder.InsertData( + table: "Users", + columns: new[] { "Id", "CreatorId", "Password", "Username" }, + values: new object[] { new Guid("6b05b739-d2fc-4616-ad3a-1e476c690ff5"), null, "password", "admin" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "Users", + keyColumn: "Id", + keyValue: new Guid("6b05b739-d2fc-4616-ad3a-1e476c690ff5")); + + migrationBuilder.AddColumn( + name: "TotalAmount", + table: "StockPurchaseDBModel", + type: "TEXT", + nullable: false, + defaultValue: 0m); + + migrationBuilder.InsertData( + table: "Users", + columns: new[] { "Id", "CreatorId", "Password", "Username" }, + values: new object[] { new Guid("6f765d6c-93a3-4666-b862-cdde776c0814"), null, "password", "admin" }); + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Migrations/StoreContextModelSnapshot.cs b/StoreManagementSystemX.Infrastructure/Migrations/StoreContextModelSnapshot.cs new file mode 100644 index 0000000..fa89877 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Migrations/StoreContextModelSnapshot.cs @@ -0,0 +1,302 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using StoreManagementSystemX.Database; + +#nullable disable + +namespace StoreManagementSystemX.Infrastructure.Migrations +{ + [DbContext(typeof(StoreContext))] + partial class StoreContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.0"); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDBModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("Barcode") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("CostPrice") + .HasColumnType("TEXT"); + + b.Property("CreatorId") + .HasColumnType("TEXT"); + + b.Property("InStock") + .HasColumnType("INTEGER"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("SellingPrice") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.ToTable("Products"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("DateTime") + .HasColumnType("TEXT"); + + b.Property("SellerId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("SellerId"); + + b.ToTable("Transactions"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionProductDBModel", b => + { + b.Property("ProductId") + .HasColumnType("TEXT"); + + b.Property("TransactionId") + .HasColumnType("TEXT"); + + b.Property("CostPrice") + .HasColumnType("TEXT"); + + b.Property("ProductName") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("QuantityBought") + .HasColumnType("INTEGER"); + + b.Property("SellingPrice") + .HasColumnType("TEXT"); + + b.HasKey("ProductId", "TransactionId"); + + b.HasIndex("TransactionId"); + + b.ToTable("TransactionProducts"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.StockPurchaseDBModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("DateTime") + .HasColumnType("TEXT"); + + b.Property("StockManagerId") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("StockManagerId"); + + b.ToTable("StockPurchaseDBModel"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.StockPurchaseProductDBModel", b => + { + b.Property("ProductId") + .HasColumnType("TEXT"); + + b.Property("StockPurchaseId") + .HasColumnType("TEXT"); + + b.Property("Barcode") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Price") + .HasColumnType("TEXT"); + + b.Property("QuantityBought") + .HasColumnType("INTEGER"); + + b.HasKey("ProductId", "StockPurchaseId"); + + b.HasIndex("StockPurchaseId"); + + b.ToTable("StockPurchaseProductDBModel"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.UserDBModel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT"); + + b.Property("CreatorId") + .HasColumnType("TEXT"); + + b.Property("Password") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Username") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("CreatorId"); + + b.ToTable("Users"); + + b.HasData( + new + { + Id = new Guid("6b05b739-d2fc-4616-ad3a-1e476c690ff5"), + Password = "password", + Username = "admin" + }); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.Models.UserDBModel", "Creator") + .WithMany() + .HasForeignKey("CreatorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Creator"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.Models.UserDBModel", "Seller") + .WithMany() + .HasForeignKey("SellerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsOne("StoreManagementSystemX.Infrastructure.DTO.PayLaterDBModel", "PayLater", b1 => + { + b1.Property("TransactionDBModelId") + .HasColumnType("TEXT"); + + b1.Property("CustomerName") + .IsRequired() + .HasColumnType("TEXT"); + + b1.Property("IsPaid") + .HasColumnType("INTEGER"); + + b1.Property("PaidAt") + .HasColumnType("TEXT"); + + b1.HasKey("TransactionDBModelId"); + + b1.ToTable("Transactions"); + + b1.WithOwner() + .HasForeignKey("TransactionDBModelId"); + }); + + b.Navigation("PayLater"); + + b.Navigation("Seller"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionProductDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.ProductDBModel", "Product") + .WithMany("TransactionProducts") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", "Transaction") + .WithMany("TransactionProducts") + .HasForeignKey("TransactionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("Transaction"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.StockPurchaseDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.Models.UserDBModel", "StockManager") + .WithMany() + .HasForeignKey("StockManagerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("StockManager"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.StockPurchaseProductDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.DTO.ProductDBModel", "Product") + .WithMany() + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("StoreManagementSystemX.Infrastructure.Models.StockPurchaseDBModel", "StockPurchase") + .WithMany("StockPurchaseProducts") + .HasForeignKey("StockPurchaseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("StockPurchase"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.UserDBModel", b => + { + b.HasOne("StoreManagementSystemX.Infrastructure.Models.UserDBModel", "Creator") + .WithMany() + .HasForeignKey("CreatorId"); + + b.Navigation("Creator"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.ProductDBModel", b => + { + b.Navigation("TransactionProducts"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.DTO.TransactionDBModel", b => + { + b.Navigation("TransactionProducts"); + }); + + modelBuilder.Entity("StoreManagementSystemX.Infrastructure.Models.StockPurchaseDBModel", b => + { + b.Navigation("StockPurchaseProducts"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Models/PayLaterDBModel.cs b/StoreManagementSystemX.Infrastructure/Models/PayLaterDBModel.cs new file mode 100644 index 0000000..6ceef89 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Models/PayLaterDBModel.cs @@ -0,0 +1,20 @@ +using Microsoft.EntityFrameworkCore; +using StoreManagementSystemX.Domain.Factories.Transactions.Interfaces; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.DTO +{ + [Owned] + public class PayLaterDBModel + { + public string CustomerName { get; set; } = string.Empty; + + public bool IsPaid { get; set; } + + public DateTime? PaidAt { get; set; } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Models/StockPurchaseDBModel.cs b/StoreManagementSystemX.Infrastructure/Models/StockPurchaseDBModel.cs new file mode 100644 index 0000000..1d7920f --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Models/StockPurchaseDBModel.cs @@ -0,0 +1,26 @@ +using StoreManagementSystemX.Infrastructure.DTO; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static StoreManagementSystemX.Domain.Aggregates.Roots.StockPurchases.StockPurchase; + +namespace StoreManagementSystemX.Infrastructure.Models +{ + public class StockPurchaseDBModel + { + + public Guid Id { get; set; } + + public Guid StockManagerId { get; set; } + + public UserDBModel StockManager { get; set; } = null!; + + public DateTime DateTime { get; set; } + + public IList StockPurchaseProducts { get; } = new List(); + + public IList Products { get; } = new List(); + } +} diff --git a/StoreManagementSystemX.Infrastructure/Models/StockPurchaseProductDBModel.cs b/StoreManagementSystemX.Infrastructure/Models/StockPurchaseProductDBModel.cs new file mode 100644 index 0000000..6cfabfe --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Models/StockPurchaseProductDBModel.cs @@ -0,0 +1,28 @@ +using StoreManagementSystemX.Infrastructure.DTO; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.Models +{ + public class StockPurchaseProductDBModel + { + public Guid StockPurchaseId { get; set; } + + public StockPurchaseDBModel StockPurchase { get; set; } = null!; + + public Guid ProductId { get; set; } + + public ProductDBModel Product { get; set; } = null!; + + public string Barcode { get; set; } = string.Empty; + + public string Name { get; set; } = string.Empty; + + public decimal Price { get; set; } + + public int QuantityBought { get; set; } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Models/TransactionDBModel.cs b/StoreManagementSystemX.Infrastructure/Models/TransactionDBModel.cs new file mode 100644 index 0000000..ac79c04 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Models/TransactionDBModel.cs @@ -0,0 +1,28 @@ +using StoreManagementSystemX.Domain.Aggregates.Roots.Transactions.Interfaces; +using StoreManagementSystemX.Domain.Factories.Transactions.Interfaces; +using StoreManagementSystemX.Infrastructure.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.DTO +{ + public class TransactionDBModel + { + public Guid Id { get; set; } + + public Guid SellerId { get; set; } + + public UserDBModel Seller { get; set; } = null!; + + public DateTime DateTime { get; set; } + + public PayLaterDBModel? PayLater { get; set; } + + public List TransactionProducts { get; set; } = new List(); + + public List Products { get; } = new List(); + } +} diff --git a/StoreManagementSystemX.Infrastructure/Models/TransactionProductDBModel.cs b/StoreManagementSystemX.Infrastructure/Models/TransactionProductDBModel.cs new file mode 100644 index 0000000..6729408 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Models/TransactionProductDBModel.cs @@ -0,0 +1,30 @@ +using StoreManagementSystemX.Domain.Factories.Transactions.Interfaces; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.DTO +{ + [Table("TransactionProducts")] + public class TransactionProductDBModel + { + public Guid TransactionId { get; set; } + + public TransactionDBModel Transaction { get; set; } = null!; + + public Guid ProductId { get; set; } + + public ProductDBModel Product { get; set; } = null!; + + public string ProductName { get; set; } = string.Empty; + + public decimal CostPrice { get; set; } + + public decimal SellingPrice { get; set; } + + public int QuantityBought { get; set; } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Models/UserDBModel.cs b/StoreManagementSystemX.Infrastructure/Models/UserDBModel.cs new file mode 100644 index 0000000..d8e233e --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Models/UserDBModel.cs @@ -0,0 +1,22 @@ +using StoreManagementSystemX.Domain.Factories.Users.Interfaces; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.Models +{ + public class UserDBModel : IUserReconstitutionArgs + { + public Guid Id { get; set; } + + public UserDBModel? Creator { get; set; } + + public Guid? CreatorId { get; set; } + + public string Username { get; set; } + + public string Password { get; set; } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Persistence/ProductRepositoryImpl.cs b/StoreManagementSystemX.Infrastructure/Persistence/ProductRepositoryImpl.cs new file mode 100644 index 0000000..3fdb6e7 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Persistence/ProductRepositoryImpl.cs @@ -0,0 +1,87 @@ +using Microsoft.EntityFrameworkCore; +using StoreManagementSystemX.Database; +using StoreManagementSystemX.Domain.Aggregates.Roots.Products.Interfaces; +using StoreManagementSystemX.Domain.Factories.Products.Interfaces; +using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; +using StoreManagementSystemX.Infrastructure.DTO; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.Persistence +{ + public class ProductRepositoryImpl : IProductRepository + { + private readonly IProductFactory _productFactory; + private DbContext _dbContext; + private DbSet _productsDTOs; + + public ProductRepositoryImpl(IProductFactory productFactory) + { + _productFactory = productFactory; + _dbContext = new StoreContext(); + _productsDTOs = _dbContext.Set(); + + } + public void Add(IProduct newProduct) + { + var productToAdd = new ProductDTO(newProduct).ToDBModel(); + _productsDTOs.Add(productToAdd); + _dbContext.SaveChanges(); + } + + public IEnumerable GetAll() + { + var storedProductDTOs = _productsDTOs.ToList(); + var products = new List(); + foreach (var productDTO in storedProductDTOs) + { + products.Add(_productFactory.Reconstitute(productDTO)); + } + + return products; + } + + public IProduct? GetByBarcode(string barcode) + { + var matchedProduct = _productsDTOs.SingleOrDefault(p => p.Barcode == barcode); + if (matchedProduct != null) + { + return _productFactory.Reconstitute(matchedProduct); + } + + return null; + } + + public IProduct? GetById(Guid id) + { + var matchedProduct = _productsDTOs.Find(id); + if (matchedProduct != null) + { + return _productFactory.Reconstitute(matchedProduct); + } + + return null; + } + + public void Remove(Guid id) + { + var productToDelete = _productsDTOs.Find(id); + if (productToDelete != null) + { + _productsDTOs.Remove(productToDelete); + } + _dbContext.SaveChanges(); + } + + public void Update(IProduct newEntity) + { + var productToUpdate = new ProductDTO(newEntity).ToDBModel(); + var productEntry = _productsDTOs.Entry(productToUpdate); + productEntry.State = EntityState.Modified; + _dbContext.SaveChanges(); + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Persistence/StockPurchaseRepositoryImpl.cs b/StoreManagementSystemX.Infrastructure/Persistence/StockPurchaseRepositoryImpl.cs new file mode 100644 index 0000000..185ac26 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Persistence/StockPurchaseRepositoryImpl.cs @@ -0,0 +1,116 @@ +using Microsoft.EntityFrameworkCore; +using StoreManagementSystemX.Database; +using StoreManagementSystemX.Domain.Aggregates.Roots.StockPurchases.Interfaces; +using StoreManagementSystemX.Domain.Factories.StockPurchases.Interfaces; +using StoreManagementSystemX.Domain.Repositories.StockPurchases.Interfaces; +using StoreManagementSystemX.Infrastructure.DTO; +using StoreManagementSystemX.Infrastructure.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.Persistence +{ + public class StockPurchaseRepositoryImpl : IStockPurchaseRepository + { + private readonly IStockPurchaseFactory _stockPurchaseFactory; + private readonly DbContext _dbContext; + private readonly DbSet _stockPurchases; + private readonly DbSet _stockPurchaseProducts; + + public StockPurchaseRepositoryImpl(IStockPurchaseFactory stockPurchaseFactory) + { + _stockPurchaseFactory = stockPurchaseFactory; + _dbContext = new StoreContext(); + _stockPurchases = _dbContext.Set(); + _stockPurchaseProducts = _dbContext.Set(); + } + + public void Add(IStockPurchase newEntity) + { + var stockPurchaseToAdd = new StockPurchaseDBModel + { + StockManagerId = newEntity.StockManagerId, + Id = newEntity.Id, + DateTime = newEntity.DateTime, + }; + + _stockPurchases.Add(stockPurchaseToAdd); + + foreach(var transactionProduct in newEntity.StockPurchaseProducts) + { + var transactionProductToAdd = new StockPurchaseProductDBModel + { + StockPurchaseId = stockPurchaseToAdd.Id, + ProductId = transactionProduct.ProductId, + Barcode = transactionProduct.Barcode, + Name = transactionProduct.Name, + Price = transactionProduct.Price, + QuantityBought = transactionProduct.QuantityBought, + }; + _stockPurchaseProducts.Add(transactionProductToAdd); + } + + _dbContext.SaveChanges(); + } + + private StockPurchaseDTO ToStockPurchaseDTO(StockPurchaseDBModel stockPurchase) + { + var stockPurchaseProductDTOs = new List(); + foreach(var stockPurchaseProduct in stockPurchase.StockPurchaseProducts) + { + stockPurchaseProductDTOs.Add(new StockPurchaseProductDTO(stockPurchaseProduct)); + } + + return new StockPurchaseDTO(stockPurchase, stockPurchaseProductDTOs); + + } + + public IEnumerable GetAll() + { + var allStockPurchases = new List(); + foreach(var stockPurchase in _stockPurchases.Include(e => e.StockPurchaseProducts)) + { + allStockPurchases.Add(_stockPurchaseFactory.Reconstitute(ToStockPurchaseDTO(stockPurchase))); + } + + return allStockPurchases; + + } + + public IStockPurchase? GetById(Guid id) + { + var storedStockPurchase = _stockPurchases.Include(e => e.StockPurchaseProducts).SingleOrDefault(e => e.Id == id); + if(storedStockPurchase != null) + { + var stockPurchaseDTO = ToStockPurchaseDTO(storedStockPurchase); + return _stockPurchaseFactory.Reconstitute(stockPurchaseDTO); + } + + return null; + } + + public void Remove(Guid id) + { + var stockPurchaseToRemove = _stockPurchases.Find(id); + if (stockPurchaseToRemove != null) + { + _stockPurchases.Remove(stockPurchaseToRemove); + } + _dbContext.SaveChanges(); + } + + public void Update(IStockPurchase updatedStockPurchase) + { + var stockPurchaseToRemove = _stockPurchases.Find(updatedStockPurchase.Id); + if (stockPurchaseToRemove != null) + { + _stockPurchases.Update(stockPurchaseToRemove); + } + + _dbContext.SaveChanges(); + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Persistence/TransactionRepositoryImpl.cs b/StoreManagementSystemX.Infrastructure/Persistence/TransactionRepositoryImpl.cs new file mode 100644 index 0000000..ac7b25b --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Persistence/TransactionRepositoryImpl.cs @@ -0,0 +1,158 @@ +using Microsoft.EntityFrameworkCore; +using StoreManagementSystemX.Database; +using StoreManagementSystemX.Domain.Aggregates.Roots.Transactions.Interfaces; +using StoreManagementSystemX.Domain.Factories.Transactions; +using StoreManagementSystemX.Domain.Factories.Transactions.Interfaces; +using StoreManagementSystemX.Domain.Repositories.Transactions.Interfaces; +using StoreManagementSystemX.Infrastructure.DTO; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.Persistence +{ + public class TransactionRepositoryImpl : ITransactionRepository + { + private readonly ITransactionFactory _transactionFactory; + private readonly DbContext _dbContext; + private readonly DbSet _transactions; + private readonly DbSet _transactionProducts; + + public TransactionRepositoryImpl(TransactionFactory transactionFactory) + { + _transactionFactory = transactionFactory; + _dbContext = new StoreContext(); + _transactions = _dbContext.Set(); + _transactionProducts = _dbContext.Set(); + } + + public void Add(ITransaction newTransaction) + { + var transactionDbModel = ToTransactionDBModel(newTransaction); + _transactions.Add(transactionDbModel); + _dbContext.SaveChanges(); + + } + + private TransactionDBModel ToTransactionDBModel(ITransaction transactionToMap) + { + var transactionDbModel = new TransactionDBModel + { + Id = transactionToMap.Id, + DateTime = transactionToMap.DateTime, + SellerId = transactionToMap.SellerId, + PayLater = transactionToMap.PayLater != null ? new PayLaterDTO(transactionToMap.PayLater).ToDBModel() : null, + TransactionProducts = new List() + }; + + foreach (var transactionProduct in transactionToMap.TransactionProducts) + { + var transactionProductDBModel = new TransactionProductDBModel + { + TransactionId = transactionDbModel.Id, + ProductId = transactionProduct.ProductId, + ProductName = transactionProduct.ProductName, + CostPrice = transactionProduct.CostPrice, + SellingPrice = transactionProduct.SellingPrice, + QuantityBought = transactionProduct.QuantityBought, + }; + transactionDbModel.TransactionProducts.Add(transactionProductDBModel); + } + + return transactionDbModel; + } + + public static TransactionDTO ToTransactionDTO(TransactionDBModel dbObject) + { + PayLaterDTO? payLaterDTO = null; + if (dbObject.PayLater != null) + { + payLaterDTO = new PayLaterDTO(dbObject.PayLater); + } + + var transactionProductsDTO = new List(); + foreach (var transactionProduct in dbObject.TransactionProducts) + { + transactionProductsDTO.Add( + new TransactionProductDTO + { + ProductId = transactionProduct.ProductId, + ProductName = transactionProduct.ProductName, + CostPrice = transactionProduct.CostPrice, + SellingPrice = transactionProduct.SellingPrice, + QuantityBought = transactionProduct.QuantityBought, + }); + } + + var transactionDTO = new TransactionDTO( + dbObject, + payLaterDTO, + transactionProductsDTO + ); + + return transactionDTO; + } + + public IEnumerable GetAll() + { + var allTransactions = new List(); + + foreach(var transaction in _transactions.Include(t => t.TransactionProducts).Include(t => t.PayLater).ToList()) + { + var transactionDTO = TransactionRepositoryImpl.ToTransactionDTO(transaction); + allTransactions.Add(_transactionFactory.Reconstitute(transactionDTO)); + } + + return allTransactions; + } + + public ITransaction? GetById(Guid id) + { + var transactionDbObject = _transactions.Include(t => t.TransactionProducts).Include(t => t.PayLater).SingleOrDefault(t => t.Id == id); + if(transactionDbObject != null) + { + var transactionDTO = TransactionRepositoryImpl.ToTransactionDTO(transactionDbObject); + return _transactionFactory.Reconstitute(transactionDTO); + + } + return null; + } + + public void Remove(Guid id) + { + var transactionToRemove = _transactions.Find(id); + if(transactionToRemove != null) + { + _transactions.Remove(transactionToRemove); + } + + _dbContext.SaveChanges(); + + } + + public void Update(ITransaction updatedTransaction) + { + var transactionToUpdate = ToTransactionDBModel(updatedTransaction); + var transactionEntry = _transactions.Entry(transactionToUpdate); + transactionEntry.State = EntityState.Modified; + + _dbContext.SaveChanges(); + _dbContext.ChangeTracker.Clear(); + } + + + public IEnumerable GetTransactionsToday() + { + var queryResult = new List(); + foreach (var transaction in _transactions.Include(t => t.TransactionProducts).Include(t => t.PayLater).Where(t => t.DateTime.Date == DateTime.Now.Date).OrderByDescending(t => t.DateTime).ToList()) + { + queryResult.Add(_transactionFactory.Reconstitute(ToTransactionDTO(transaction))); + } + + return queryResult; + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Persistence/UserRepositoryImpl.cs b/StoreManagementSystemX.Infrastructure/Persistence/UserRepositoryImpl.cs new file mode 100644 index 0000000..8ced5c1 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Persistence/UserRepositoryImpl.cs @@ -0,0 +1,89 @@ +using Microsoft.EntityFrameworkCore; +using StoreManagementSystemX.Database; +using StoreManagementSystemX.Domain.Aggregates.Roots.Users.Interfaces; +using StoreManagementSystemX.Domain.Factories.Users.Interfaces; +using StoreManagementSystemX.Domain.Repositories.Users.Interfaces; +using StoreManagementSystemX.Infrastructure.DTO; +using StoreManagementSystemX.Infrastructure.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Infrastructure.Persistence +{ + public class UserRepositoryImpl : IUserRepository + { + private DbContext _context; + private DbSet _users; + private IUserFactory _userFactory; + + public UserRepositoryImpl(IUserFactory userFactory) + { + _userFactory = userFactory; + _context = new StoreContext(); + _users = _context.Set(); + } + public void Add(IUser newEntity) + { + var userDTO = new UserDTO(newEntity); + + _users.Add(userDTO.ToDBModel()); + _context.SaveChanges(); + } + + public IEnumerable GetAll() + { + var allUsers = new List(); + foreach (var user in _users) + { + var userDTO = new UserDTO(user); + allUsers.Add(_userFactory.Reconstitute(userDTO)); + } + + return allUsers; + } + + public IUser? GetById(Guid id) + { + var storedUser = _users.Find(id); + if(storedUser != null) + { + return _userFactory.Reconstitute(storedUser); + } + + return null; + } + + public IUser? GetByUsernameAndPassword(string username, string password) + { + + var matchedUser = _users.SingleOrDefault(u => u.Username == username && u.Password == password); + if(matchedUser != null) + { + return _userFactory.Reconstitute(matchedUser); + + } + + return null; + } + + public void Remove(Guid id) + { + var matchedUser = _users.Find(id); + if(matchedUser != null) + { + _users.Remove(matchedUser); + } + _context.SaveChanges(); + } + + public void Update(IUser newEntity) + { + var userToUpdate = new UserDTO(newEntity).ToDBModel(); + _users.Entry(userToUpdate).State = EntityState.Modified; + _context.SaveChanges(); + } + } +} diff --git a/StoreManagementSystemX.Infrastructure/Program.cs b/StoreManagementSystemX.Infrastructure/Program.cs new file mode 100644 index 0000000..3751555 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/Program.cs @@ -0,0 +1,2 @@ +// See https://aka.ms/new-console-template for more information +Console.WriteLine("Hello, World!"); diff --git a/StoreManagementSystemX.Infrastructure/StoreContext.cs b/StoreManagementSystemX.Infrastructure/StoreContext.cs new file mode 100644 index 0000000..549e872 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/StoreContext.cs @@ -0,0 +1,59 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Logging; +using StoreManagementSystemX.Infrastructure.DTO; +using StoreManagementSystemX.Infrastructure.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection.Metadata; +using System.Text; +using System.Threading.Tasks; +using static StoreManagementSystemX.Domain.Aggregates.Roots.Transactions.Transaction; + +namespace StoreManagementSystemX.Database +{ + public class StoreContext : DbContext + { + public DbSet Users { get; set; } + public DbSet Products { get; set; } + public DbSet Transactions { get; set; } + + public string DBPath { get; } + + public StoreContext() + { +; DBPath = System.IO.Path.GetFullPath("sqlite.db"); + Console.WriteLine("DBPath: " + DBPath); + } + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + => optionsBuilder.UseSqlite($"Data Source={DBPath}") + .UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking) + .LogTo(Console.WriteLine, LogLevel.Information); + // The following three options help with debugging, but should + // be changed or removed for production. + //.LogTo(Console.WriteLine, LogLevel.Information) + //.EnableSensitiveDataLogging() + //.EnableDetailedErrors(); + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.Entity() + .HasMany(e => e.Products) + .WithMany(e => e.Transactions) + .UsingEntity(); + + modelBuilder.Entity() + .HasMany(e => e.Products) + .WithMany(e => e.StockPurchases) + .UsingEntity(); + + UserDBModel admin = new UserDBModel { Id = Guid.NewGuid(), Username = "admin", Password = "password" }; + modelBuilder.Entity() + .HasData(admin); + + + } + } + +} diff --git a/StoreManagementSystemX.Infrastructure/StoreManagementSystemX.Infrastructure.csproj b/StoreManagementSystemX.Infrastructure/StoreManagementSystemX.Infrastructure.csproj new file mode 100644 index 0000000..e40eae1 --- /dev/null +++ b/StoreManagementSystemX.Infrastructure/StoreManagementSystemX.Infrastructure.csproj @@ -0,0 +1,28 @@ + + + + Exe + net8.0 + enable + enable + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + PreserveNewest + + + + diff --git a/StoreManagementSystemX.Infrastructure/sqlite.db b/StoreManagementSystemX.Infrastructure/sqlite.db new file mode 100644 index 0000000000000000000000000000000000000000..385395ed8a7a07edd3315e543998807ea4c0b7e0 GIT binary patch literal 102400 zcmeI5O>7&-700>!T1qlSJC3t)0s#vqLd3*QMA4G$gV9pdN+v8(G({y6QfITFHZmiM zbhyhp0(vOz*g%RN+G`I1iUi0Z@Tow7Tzc-gr}WfQks^m4ate^3=*)6wKd4zs4pgKe z|AZ-$GjHC!`OSN8hBJ`7d26k1>him-_JL-~xzO2AI2`)9EQdm&FnL}i&u8rS7szXr zJlR8FZw9=EL$AL3b&LoIsqd)Rh17SGpG|z4+?cpJ{$)It_$2oB*ei)|qF+U#(T~HA z!;c5(Le;1f*t!sx>IETGZ|>?J81FZT=c-!AY+0YxO|wQJxD~!}>XxCmjh@{eb5=GgN^!MBEtY3` zP~6&#Tv1k(ic%^ln{wJxKoC(l8F`~5FDq*b0b0m!7V^tVay+woJ}$jEf1(NJ&$L~d zx_3^Lu1^cyi)b6ymAsrA? zn9g+5Nm1I$3Ed*6XWK~)uQfg^n84&9W0;U%%Mrtv7`4x1FJ=Gm`3X_V<%ExJTLIvy zWsNvRXZ-HZk#N1=QyJ*8c2~#Mm$X2yF0>4@+^*Mxyq?ZVy}36?!K}o=)hK*6patf2FZ$k;XfG(bm zOE;%apw95=G0r`BIVDQd)50UEKS~Twf5zFsxS+#4>2l!J=<_9(!jH-DW$kc{tO0Gc z&@s%`f!_AU4OxDe8b_{Zl(jl>C&%M?LR2L0EEygNC*k=Qxnq6GV5^9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AOHd&00JNY0w6GC z1n~R+LpGrp4hVn%2!H?xfB*=900@8p2!H?xa0uY<|8t _currentViewModel; set => SetProperty(ref _currentViewModel, value); } - private UnitOfWork? _unitOfWork; public void NavigateTo(View view) { - if (_unitOfWork != null) - { - _unitOfWork.Dispose(); - } - - _unitOfWork = new UnitOfWork(); if (view == View.Login) { CurrentViewModel = new LoginViewModel(_authenticationService, _dialogService); diff --git a/StoreManagementSystemX/Services/ProductCreationService.cs b/StoreManagementSystemX/Services/ProductCreationService.cs index 0304ae6..d0e82b0 100644 --- a/StoreManagementSystemX/Services/ProductCreationService.cs +++ b/StoreManagementSystemX/Services/ProductCreationService.cs @@ -1,5 +1,4 @@ -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; +using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; using StoreManagementSystemX.Services.Interfaces; using StoreManagementSystemX.Views.Products; using System; diff --git a/StoreManagementSystemX/Services/ProductUpdateService.cs b/StoreManagementSystemX/Services/ProductUpdateService.cs index 1ba2414..f69c998 100644 --- a/StoreManagementSystemX/Services/ProductUpdateService.cs +++ b/StoreManagementSystemX/Services/ProductUpdateService.cs @@ -1,6 +1,4 @@ -using SQLitePCL; -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; +using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; using StoreManagementSystemX.Services.Interfaces; using StoreManagementSystemX.Views.Products; using System; diff --git a/StoreManagementSystemX/Services/StockPurchaseCreationService.cs b/StoreManagementSystemX/Services/StockPurchaseCreationService.cs index 1a6f14c..b9187ce 100644 --- a/StoreManagementSystemX/Services/StockPurchaseCreationService.cs +++ b/StoreManagementSystemX/Services/StockPurchaseCreationService.cs @@ -1,5 +1,4 @@ -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; +using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; using StoreManagementSystemX.Domain.Repositories.StockPurchases.Interfaces; using StoreManagementSystemX.Services.Interfaces; using StoreManagementSystemX.Views.StockPurchases; diff --git a/StoreManagementSystemX/Services/TransactionCreationService.cs b/StoreManagementSystemX/Services/TransactionCreationService.cs index 850572f..59bb294 100644 --- a/StoreManagementSystemX/Services/TransactionCreationService.cs +++ b/StoreManagementSystemX/Services/TransactionCreationService.cs @@ -1,5 +1,4 @@ -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; +using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; using StoreManagementSystemX.Domain.Repositories.Transactions.Interfaces; using StoreManagementSystemX.Services.Interfaces; using StoreManagementSystemX.ViewModels.Transactions.Interfaces; diff --git a/StoreManagementSystemX/Services/UserCreationService.cs b/StoreManagementSystemX/Services/UserCreationService.cs index 60f79fd..896afa7 100644 --- a/StoreManagementSystemX/Services/UserCreationService.cs +++ b/StoreManagementSystemX/Services/UserCreationService.cs @@ -1,5 +1,4 @@ -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Domain.Repositories.Users.Interfaces; +using StoreManagementSystemX.Domain.Repositories.Users.Interfaces; using StoreManagementSystemX.Services.Interfaces; using StoreManagementSystemX.Views.Users; using System; diff --git a/StoreManagementSystemX/StoreManagementSystemX.csproj b/StoreManagementSystemX/StoreManagementSystemX.csproj index d7cfa3c..129828d 100644 --- a/StoreManagementSystemX/StoreManagementSystemX.csproj +++ b/StoreManagementSystemX/StoreManagementSystemX.csproj @@ -15,7 +15,7 @@ - + diff --git a/StoreManagementSystemX/ViewModels/DashboardViewModel.cs b/StoreManagementSystemX/ViewModels/DashboardViewModel.cs index aa282b4..f3eb924 100644 --- a/StoreManagementSystemX/ViewModels/DashboardViewModel.cs +++ b/StoreManagementSystemX/ViewModels/DashboardViewModel.cs @@ -1,5 +1,4 @@ using CommunityToolkit.Mvvm.Input; -using StoreManagementSystemX.Database.DAL.Interfaces; using StoreManagementSystemX.Domain.Repositories.Transactions.Interfaces; using StoreManagementSystemX.Services; using StoreManagementSystemX.Services.Interfaces; @@ -28,7 +27,7 @@ public DashboardViewModel(AuthContext authContext, Domain.Repositories.Transacti _transactionCreationService = transactionCreationService; TransactionsToday = new ObservableCollection(); - var transactions = _transactionRepository.GetAll(); + var transactions = _transactionRepository.GetTransactionsToday(); foreach (var transaction in transactions) { TransactionsToday.Add(new TransactionRowViewModel(transactionRepository, _dialogService, transaction)); diff --git a/StoreManagementSystemX/ViewModels/LoginViewModel.cs b/StoreManagementSystemX/ViewModels/LoginViewModel.cs index 5d93f69..69e57da 100644 --- a/StoreManagementSystemX/ViewModels/LoginViewModel.cs +++ b/StoreManagementSystemX/ViewModels/LoginViewModel.cs @@ -1,5 +1,4 @@ using CommunityToolkit.Mvvm.Input; -using StoreManagementSystemX.Database.DAL; using StoreManagementSystemX.Services.Interfaces; using System; using System.Collections.Generic; @@ -15,12 +14,10 @@ public class LoginViewModel: BaseViewModel { public LoginViewModel(IAuthenticationService authenticationService, IDialogService dialogService) { _username = string.Empty; - _unitOfWork = new UnitOfWork(); _authenticationService = authenticationService; _dialogService = dialogService; } - private readonly UnitOfWork _unitOfWork; private readonly IAuthenticationService _authenticationService; private readonly IDialogService _dialogService; diff --git a/StoreManagementSystemX/ViewModels/MainViewModel.cs b/StoreManagementSystemX/ViewModels/MainViewModel.cs index 3a158f8..7a16d1d 100644 --- a/StoreManagementSystemX/ViewModels/MainViewModel.cs +++ b/StoreManagementSystemX/ViewModels/MainViewModel.cs @@ -1,6 +1,4 @@ -using StoreManagementSystemX.Database; -using StoreManagementSystemX.Database.DAL; -using StoreManagementSystemX.Domain.Factories.Products; +using StoreManagementSystemX.Domain.Factories.Products; using StoreManagementSystemX.Domain.Factories.StockPurchases; using StoreManagementSystemX.Domain.Factories.Transactions; using StoreManagementSystemX.Domain.Factories.Transactions.Interfaces; @@ -11,6 +9,7 @@ using StoreManagementSystemX.Domain.Repositories.Transactions; using StoreManagementSystemX.Domain.Repositories.Users; using StoreManagementSystemX.Domain.Repositories.Users.Interfaces; +using StoreManagementSystemX.Infrastructure.Persistence; using StoreManagementSystemX.Services; using StoreManagementSystemX.Services.Interfaces; using StoreManagementSystemX.ViewModels; @@ -29,33 +28,29 @@ public class MainViewModel: BaseViewModel public MainViewModel() { - Context dbContext = new Context(); var dialogService = new DialogService(); - var unitOfWorkFactory = new UnitOfWorkFactory(); - var productRepository = new Domain.Repositories.Products.ProductRepository(); - var barcodeGenerationService = new BarcodeGenerationService(productRepository); + var barcodeGenerationService = new BarcodeGenerationService(); var productFactory = new ProductFactory(barcodeGenerationService); + var productRepository = new ProductRepositoryImpl(productFactory); - var stockPurchaseRepository = new Domain.Repositories.StockPurchases.StockPurchaseRepository(); var payLaterFactory = new PayLaterFactory(); var transactionFactory = new TransactionFactory(payLaterFactory); var stockPurchaseFactory = new StockPurchaseFactory(); + var stockPurchaseRepository = new StockPurchaseRepositoryImpl(stockPurchaseFactory); var userFactory = new Domain.Factories.Users.UserFactory(productFactory, transactionFactory, stockPurchaseFactory); - var transactionRepository = new Domain.Repositories.Transactions.TransactionRepository(); + var transactionRepository = new TransactionRepositoryImpl(transactionFactory); + + IUserRepository userRepository = new UserRepositoryImpl(userFactory); - IUserRepository userRepository = new Domain.Repositories.Users.UserRepository(userFactory); - var admin = userFactory.Create(new CreateUserArgs { CreatorId = Guid.NewGuid(), Username = "admin", Password = "password" }); - userRepository.Add(admin); AuthenticationService = new AuthenticationService(userRepository, dialogService); LoginViewModel loginViewModel = new LoginViewModel(AuthenticationService, dialogService); NavigationService = new NavigationService( loginViewModel, - unitOfWorkFactory, AuthenticationService, dialogService, productRepository, @@ -75,7 +70,6 @@ private class CreateUserArgs : ICreateUserArgs public INavigationService NavigationService { get; } public IAuthenticationService AuthenticationService { get; } - private readonly Database.DAL.UserRepository _userRepository; } } diff --git a/StoreManagementSystemX/ViewModels/Products/CreateProductViewModel.cs b/StoreManagementSystemX/ViewModels/Products/CreateProductViewModel.cs index 538a734..62087a2 100644 --- a/StoreManagementSystemX/ViewModels/Products/CreateProductViewModel.cs +++ b/StoreManagementSystemX/ViewModels/Products/CreateProductViewModel.cs @@ -1,6 +1,4 @@ using CommunityToolkit.Mvvm.Input; -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Factories.Products.Interfaces; using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; using StoreManagementSystemX.Services; diff --git a/StoreManagementSystemX/ViewModels/Products/InventoryViewModel.cs b/StoreManagementSystemX/ViewModels/Products/InventoryViewModel.cs index d402ecc..165e1fe 100644 --- a/StoreManagementSystemX/ViewModels/Products/InventoryViewModel.cs +++ b/StoreManagementSystemX/ViewModels/Products/InventoryViewModel.cs @@ -1,7 +1,5 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using SQLitePCL; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Aggregates.Roots.Products.Interfaces; using StoreManagementSystemX.Domain.Repositories; using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; diff --git a/StoreManagementSystemX/ViewModels/Products/UpdateProductViewModel.cs b/StoreManagementSystemX/ViewModels/Products/UpdateProductViewModel.cs index 2886db4..3f2bcb7 100644 --- a/StoreManagementSystemX/ViewModels/Products/UpdateProductViewModel.cs +++ b/StoreManagementSystemX/ViewModels/Products/UpdateProductViewModel.cs @@ -1,8 +1,6 @@ using Accessibility; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Aggregates.Roots.Products.Interfaces; using StoreManagementSystemX.Domain.Factories.Products.Interfaces; using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; diff --git a/StoreManagementSystemX/ViewModels/StockPurchases/CreateStockPurchaseProductViewModel.cs b/StoreManagementSystemX/ViewModels/StockPurchases/CreateStockPurchaseProductViewModel.cs index eb51b71..5af9f6c 100644 --- a/StoreManagementSystemX/ViewModels/StockPurchases/CreateStockPurchaseProductViewModel.cs +++ b/StoreManagementSystemX/ViewModels/StockPurchases/CreateStockPurchaseProductViewModel.cs @@ -1,6 +1,4 @@ using CommunityToolkit.Mvvm.Input; -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Aggregates.Roots.Products.Interfaces; using StoreManagementSystemX.Domain.Aggregates.Roots.StockPurchases.Interfaces; using StoreManagementSystemX.Domain.Aggregates.Roots.Transactions.Interfaces; @@ -48,7 +46,6 @@ internal CreateStockPurchaseProductViewModel(IStockPurchase stockPurchase, IProd public string Name { get; } - private int _quantity; public int Quantity => _stockPurchase.StockPurchaseProducts.First(e => e.Barcode == _product.Barcode).QuantityBought; public decimal Price { get; } diff --git a/StoreManagementSystemX/ViewModels/StockPurchases/CreateStockPurchaseViewModel.cs b/StoreManagementSystemX/ViewModels/StockPurchases/CreateStockPurchaseViewModel.cs index 362be51..2c39d16 100644 --- a/StoreManagementSystemX/ViewModels/StockPurchases/CreateStockPurchaseViewModel.cs +++ b/StoreManagementSystemX/ViewModels/StockPurchases/CreateStockPurchaseViewModel.cs @@ -1,8 +1,4 @@ using CommunityToolkit.Mvvm.Input; -using Microsoft.EntityFrameworkCore.Metadata.Conventions; -using SQLitePCL; -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Aggregates.Roots.Products.Interfaces; using StoreManagementSystemX.Domain.Aggregates.Roots.StockPurchases.Interfaces; using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; diff --git a/StoreManagementSystemX/ViewModels/StockPurchases/Interfaces/ICreateStockPurchaseProductViewModel.cs b/StoreManagementSystemX/ViewModels/StockPurchases/Interfaces/ICreateStockPurchaseProductViewModel.cs index 743fbf4..2dd0acc 100644 --- a/StoreManagementSystemX/ViewModels/StockPurchases/Interfaces/ICreateStockPurchaseProductViewModel.cs +++ b/StoreManagementSystemX/ViewModels/StockPurchases/Interfaces/ICreateStockPurchaseProductViewModel.cs @@ -1,5 +1,4 @@ -using StoreManagementSystemX.Database.Models; -using StoreManagementSystemX.Domain.Aggregates.Roots.Products.Interfaces; +using StoreManagementSystemX.Domain.Aggregates.Roots.Products.Interfaces; using StoreManagementSystemX.Domain.Aggregates.Roots.StockPurchases.Interfaces; using System; using System.Collections.Generic; diff --git a/StoreManagementSystemX/ViewModels/StockPurchases/StockPurchaseListViewModel.cs b/StoreManagementSystemX/ViewModels/StockPurchases/StockPurchaseListViewModel.cs index 18e7a39..f4f48cf 100644 --- a/StoreManagementSystemX/ViewModels/StockPurchases/StockPurchaseListViewModel.cs +++ b/StoreManagementSystemX/ViewModels/StockPurchases/StockPurchaseListViewModel.cs @@ -1,7 +1,4 @@ using CommunityToolkit.Mvvm.Input; -using StoreManagementSystemX.Database.DAL; -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Aggregates.Roots.StockPurchases.Interfaces; using StoreManagementSystemX.Domain.Repositories.StockPurchases.Interfaces; using StoreManagementSystemX.Services; diff --git a/StoreManagementSystemX/ViewModels/StockPurchases/StockPurchaseProductViewModel.cs b/StoreManagementSystemX/ViewModels/StockPurchases/StockPurchaseProductViewModel.cs index 9131741..266b7a6 100644 --- a/StoreManagementSystemX/ViewModels/StockPurchases/StockPurchaseProductViewModel.cs +++ b/StoreManagementSystemX/ViewModels/StockPurchases/StockPurchaseProductViewModel.cs @@ -1,5 +1,4 @@ using CommunityToolkit.Mvvm.ComponentModel; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Aggregates.Roots.StockPurchases.Interfaces; using StoreManagementSystemX.ViewModels.StockPurchases.Interfaces; using System; diff --git a/StoreManagementSystemX/ViewModels/StockPurchases/StockPurchaseViewModel.cs b/StoreManagementSystemX/ViewModels/StockPurchases/StockPurchaseViewModel.cs index b6f64ed..504dd86 100644 --- a/StoreManagementSystemX/ViewModels/StockPurchases/StockPurchaseViewModel.cs +++ b/StoreManagementSystemX/ViewModels/StockPurchases/StockPurchaseViewModel.cs @@ -1,6 +1,4 @@ using CommunityToolkit.Mvvm.ComponentModel; -using Microsoft.EntityFrameworkCore.Query; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Aggregates.Roots.StockPurchases.Interfaces; using System; using System.Collections.Generic; diff --git a/StoreManagementSystemX/ViewModels/Transactions/CreateTransactionProductViewModel.cs b/StoreManagementSystemX/ViewModels/Transactions/CreateTransactionProductViewModel.cs index 6cbfe6f..310c500 100644 --- a/StoreManagementSystemX/ViewModels/Transactions/CreateTransactionProductViewModel.cs +++ b/StoreManagementSystemX/ViewModels/Transactions/CreateTransactionProductViewModel.cs @@ -1,8 +1,5 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using SQLitePCL; -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Aggregates.Roots.Products.Interfaces; using StoreManagementSystemX.Domain.Aggregates.Roots.Transactions.Interfaces; using StoreManagementSystemX.Domain.Repositories.Transactions.Interfaces; diff --git a/StoreManagementSystemX/ViewModels/Transactions/CreateTransactionViewModel.cs b/StoreManagementSystemX/ViewModels/Transactions/CreateTransactionViewModel.cs index 13911dc..fd9e51c 100644 --- a/StoreManagementSystemX/ViewModels/Transactions/CreateTransactionViewModel.cs +++ b/StoreManagementSystemX/ViewModels/Transactions/CreateTransactionViewModel.cs @@ -1,8 +1,5 @@  using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using SQLitePCL; -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Aggregates.Roots.Products.Interfaces; using StoreManagementSystemX.Domain.Aggregates.Roots.Transactions.Interfaces; using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; diff --git a/StoreManagementSystemX/ViewModels/Transactions/Interfaces/ITransactionListViewModel.cs b/StoreManagementSystemX/ViewModels/Transactions/Interfaces/ITransactionListViewModel.cs index cfdf89b..b4ff730 100644 --- a/StoreManagementSystemX/ViewModels/Transactions/Interfaces/ITransactionListViewModel.cs +++ b/StoreManagementSystemX/ViewModels/Transactions/Interfaces/ITransactionListViewModel.cs @@ -12,7 +12,7 @@ public interface ITransactionListViewModel { public ObservableCollection Transactions { get; } - public ITransactionRowViewModel SelectedTransaction { get; set; } + public ITransactionRowViewModel? SelectedTransaction { get; set; } public ICommand NewTransactionCommand { get; } } diff --git a/StoreManagementSystemX/ViewModels/Transactions/Interfaces/ITransactionRepository.cs b/StoreManagementSystemX/ViewModels/Transactions/Interfaces/ITransactionRepository.cs deleted file mode 100644 index ff6e492..0000000 --- a/StoreManagementSystemX/ViewModels/Transactions/Interfaces/ITransactionRepository.cs +++ /dev/null @@ -1,19 +0,0 @@ -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Database.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Text; -using System.Threading.Tasks; - -namespace StoreManagementSystemX.ViewModels.Transactions.Interfaces -{ - public interface ITransactionRepository : IRepository - { - - public IEnumerable Find(Expression> predicate); - - public void Attach(Transaction transaction); - } -} diff --git a/StoreManagementSystemX/ViewModels/Transactions/PayLaterTransactionRowViewModel.cs b/StoreManagementSystemX/ViewModels/Transactions/PayLaterTransactionRowViewModel.cs index 0c42b9a..e6b144d 100644 --- a/StoreManagementSystemX/ViewModels/Transactions/PayLaterTransactionRowViewModel.cs +++ b/StoreManagementSystemX/ViewModels/Transactions/PayLaterTransactionRowViewModel.cs @@ -1,7 +1,4 @@ using CommunityToolkit.Mvvm.Input; -using SQLitePCL; -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Aggregates.Roots.Transactions.Interfaces; using StoreManagementSystemX.Domain.Repositories.Transactions.Interfaces; using StoreManagementSystemX.Services.Interfaces; @@ -19,7 +16,7 @@ namespace StoreManagementSystemX.ViewModels.Transactions public class PayLaterTransactionRowViewModel : BaseViewModel { public PayLaterTransactionRowViewModel( - Domain.Repositories.Transactions.Interfaces.ITransactionRepository transactionRepository, + ITransactionRepository transactionRepository, ITransaction transaction, IDialogService dialogService) { @@ -35,7 +32,7 @@ public PayLaterTransactionRowViewModel( private readonly ITransaction _transaction; - private readonly Domain.Repositories.Transactions.Interfaces.ITransactionRepository _transactionRepository; + private readonly ITransactionRepository _transactionRepository; private readonly IDialogService _dialogService; diff --git a/StoreManagementSystemX/ViewModels/Transactions/PayLaterTransactionsViewModel.cs b/StoreManagementSystemX/ViewModels/Transactions/PayLaterTransactionsViewModel.cs index 60a987b..0ce4cf8 100644 --- a/StoreManagementSystemX/ViewModels/Transactions/PayLaterTransactionsViewModel.cs +++ b/StoreManagementSystemX/ViewModels/Transactions/PayLaterTransactionsViewModel.cs @@ -1,6 +1,4 @@ using CommunityToolkit.Mvvm.Input; -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Aggregates.Roots.Transactions.Interfaces; using StoreManagementSystemX.Domain.Repositories.Transactions.Interfaces; using StoreManagementSystemX.Services; @@ -32,7 +30,7 @@ public PayLaterTransactionsViewModel(AuthContext authContext, Domain.Repositorie foreach(var transaction in _transactionRepository.GetAll()) { - if(transaction != null) + if(transaction.PayLater != null) { Transactions.Add(new PayLaterTransactionRowViewModel(transactionRepository, transaction, dialogService)); } diff --git a/StoreManagementSystemX/ViewModels/Transactions/TransactionListViewModel.cs b/StoreManagementSystemX/ViewModels/Transactions/TransactionListViewModel.cs index 76d6add..d07ba28 100644 --- a/StoreManagementSystemX/ViewModels/Transactions/TransactionListViewModel.cs +++ b/StoreManagementSystemX/ViewModels/Transactions/TransactionListViewModel.cs @@ -1,6 +1,4 @@ using CommunityToolkit.Mvvm.Input; -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Aggregates.Roots.Transactions.Interfaces; using StoreManagementSystemX.Domain.Repositories.Transactions.Interfaces; using StoreManagementSystemX.Services; diff --git a/StoreManagementSystemX/ViewModels/Transactions/TransactionProductRowViewModel.cs b/StoreManagementSystemX/ViewModels/Transactions/TransactionProductRowViewModel.cs index 8a3e83d..07af431 100644 --- a/StoreManagementSystemX/ViewModels/Transactions/TransactionProductRowViewModel.cs +++ b/StoreManagementSystemX/ViewModels/Transactions/TransactionProductRowViewModel.cs @@ -1,5 +1,4 @@  -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Aggregates.Roots.Transactions.Interfaces; using StoreManagementSystemX.Views.Transactions; diff --git a/StoreManagementSystemX/ViewModels/Transactions/TransactionRowViewModel.cs b/StoreManagementSystemX/ViewModels/Transactions/TransactionRowViewModel.cs index 6fcf27e..d0abe53 100644 --- a/StoreManagementSystemX/ViewModels/Transactions/TransactionRowViewModel.cs +++ b/StoreManagementSystemX/ViewModels/Transactions/TransactionRowViewModel.cs @@ -1,7 +1,4 @@ using CommunityToolkit.Mvvm.Input; -using SQLitePCL; -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Aggregates.Roots.Transactions.Interfaces; using StoreManagementSystemX.Domain.Repositories.Transactions.Interfaces; using StoreManagementSystemX.Services.Interfaces; diff --git a/StoreManagementSystemX/ViewModels/Users/CreateUserViewModel.cs b/StoreManagementSystemX/ViewModels/Users/CreateUserViewModel.cs index d9f84c8..d36cbec 100644 --- a/StoreManagementSystemX/ViewModels/Users/CreateUserViewModel.cs +++ b/StoreManagementSystemX/ViewModels/Users/CreateUserViewModel.cs @@ -1,8 +1,5 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using StoreManagementSystemX.Database.DAL; -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Factories.Users.Interfaces; using StoreManagementSystemX.Domain.Repositories.Users.Interfaces; using StoreManagementSystemX.Services; diff --git a/StoreManagementSystemX/ViewModels/Users/Interfaces/IUserRepository.cs b/StoreManagementSystemX/ViewModels/Users/Interfaces/IUserRepository.cs deleted file mode 100644 index 92e6cca..0000000 --- a/StoreManagementSystemX/ViewModels/Users/Interfaces/IUserRepository.cs +++ /dev/null @@ -1,18 +0,0 @@ -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Database.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Text; -using System.Threading.Tasks; - -namespace StoreManagementSystemX.ViewModels.Users.Interfaces -{ - public interface IUserRepository : IRepository - { - - public User? Find(Expression> predicate); - - } -} diff --git a/StoreManagementSystemX/ViewModels/Users/UserListViewModel.cs b/StoreManagementSystemX/ViewModels/Users/UserListViewModel.cs index ed281c7..97f50cb 100644 --- a/StoreManagementSystemX/ViewModels/Users/UserListViewModel.cs +++ b/StoreManagementSystemX/ViewModels/Users/UserListViewModel.cs @@ -1,6 +1,4 @@ using CommunityToolkit.Mvvm.Input; -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Database.Models; using StoreManagementSystemX.Domain.Aggregates.Roots.Users.Interfaces; using StoreManagementSystemX.Domain.Repositories.Users.Interfaces; using StoreManagementSystemX.Services; diff --git a/StoreManagementSystemX/Views/Products/CreateProductWindow.xaml.cs b/StoreManagementSystemX/Views/Products/CreateProductWindow.xaml.cs index 02aa7b0..3f33573 100644 --- a/StoreManagementSystemX/Views/Products/CreateProductWindow.xaml.cs +++ b/StoreManagementSystemX/Views/Products/CreateProductWindow.xaml.cs @@ -1,5 +1,4 @@ -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; +using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; using StoreManagementSystemX.Services; using StoreManagementSystemX.Services.Interfaces; using StoreManagementSystemX.ViewModels.Products; diff --git a/StoreManagementSystemX/Views/Products/UpdateProductWindow.xaml.cs b/StoreManagementSystemX/Views/Products/UpdateProductWindow.xaml.cs index 6cf715c..0ac8625 100644 --- a/StoreManagementSystemX/Views/Products/UpdateProductWindow.xaml.cs +++ b/StoreManagementSystemX/Views/Products/UpdateProductWindow.xaml.cs @@ -1,5 +1,4 @@ -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; +using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; using StoreManagementSystemX.Services.Interfaces; using StoreManagementSystemX.ViewModels.Products; using System; diff --git a/StoreManagementSystemX/Views/StockPurchases/CreateStockPurchaseWindow.xaml.cs b/StoreManagementSystemX/Views/StockPurchases/CreateStockPurchaseWindow.xaml.cs index aca8119..c7a0ca5 100644 --- a/StoreManagementSystemX/Views/StockPurchases/CreateStockPurchaseWindow.xaml.cs +++ b/StoreManagementSystemX/Views/StockPurchases/CreateStockPurchaseWindow.xaml.cs @@ -1,5 +1,4 @@ -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; +using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; using StoreManagementSystemX.Domain.Repositories.StockPurchases.Interfaces; using StoreManagementSystemX.Services; using StoreManagementSystemX.Services.Interfaces; diff --git a/StoreManagementSystemX/Views/Transactions/CreateTransactionWindow.xaml.cs b/StoreManagementSystemX/Views/Transactions/CreateTransactionWindow.xaml.cs index ac546ff..f3db315 100644 --- a/StoreManagementSystemX/Views/Transactions/CreateTransactionWindow.xaml.cs +++ b/StoreManagementSystemX/Views/Transactions/CreateTransactionWindow.xaml.cs @@ -1,5 +1,4 @@ -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; +using StoreManagementSystemX.Domain.Repositories.Products.Interfaces; using StoreManagementSystemX.Domain.Repositories.Transactions.Interfaces; using StoreManagementSystemX.Services; using StoreManagementSystemX.Services.Interfaces; diff --git a/StoreManagementSystemX/Views/Users/CreateUserWindow.xaml.cs b/StoreManagementSystemX/Views/Users/CreateUserWindow.xaml.cs index 8c171ed..45a7164 100644 --- a/StoreManagementSystemX/Views/Users/CreateUserWindow.xaml.cs +++ b/StoreManagementSystemX/Views/Users/CreateUserWindow.xaml.cs @@ -1,6 +1,4 @@ -using StoreManagementSystemX.Database.DAL; -using StoreManagementSystemX.Database.DAL.Interfaces; -using StoreManagementSystemX.Domain.Repositories.Users.Interfaces; +using StoreManagementSystemX.Domain.Repositories.Users.Interfaces; using StoreManagementSystemX.Services; using StoreManagementSystemX.ViewModels.Users; using System; diff --git a/StoreManagementX.Domain/Aggregates/Roots/StockPurchases/StockPurchase.cs b/StoreManagementX.Domain/Aggregates/Roots/StockPurchases/StockPurchase.cs index dae2ef4..f199d5f 100644 --- a/StoreManagementX.Domain/Aggregates/Roots/StockPurchases/StockPurchase.cs +++ b/StoreManagementX.Domain/Aggregates/Roots/StockPurchases/StockPurchase.cs @@ -22,6 +22,15 @@ internal StockPurchase(Guid stockManagerId, Guid id) DateTime = DateTime.Now; } + internal StockPurchase(Guid stockManagerId, Guid id, DateTime dateTime, decimal totalAmount, IList stockPurchaseProduct) + { + StockManagerId = stockManagerId; + Id = id; + DateTime = dateTime; + TotalAmount = totalAmount; + _stockPurchaseProduct = stockPurchaseProduct; + } + public Guid Id { get; } private IList _stockPurchaseProduct = new List(); @@ -41,14 +50,15 @@ public IStockPurchaseProduct AddProduct(IProduct product) if (matchedProduct == null) // new product added { - var stockPurchaseProduct = new StockPurchaseProduct(this, product); + var stockPurchaseProduct = new StockPurchaseProduct(product); _stockPurchaseProduct.Add(stockPurchaseProduct); product.InStock += 1; + TotalAmount += product.CostPrice; return stockPurchaseProduct; } else { + TotalAmount += product.CostPrice; matchedProduct.QuantityBought += 1; - product.InStock += 1; return matchedProduct; } } @@ -58,8 +68,7 @@ public IStockPurchaseProduct IncrementProduct(IProduct product, int quantity = 1 { var stockPurchaseProduct = _stockPurchaseProduct.First(tp => tp.ProductId == product.Id); stockPurchaseProduct.QuantityBought += quantity; - product.InStock += quantity; - + TotalAmount += product.CostPrice * quantity; return stockPurchaseProduct; } @@ -67,8 +76,7 @@ public IStockPurchaseProduct DecrementProduct(IProduct product, int quantity = 1 { var stockPurchaseProduct = _stockPurchaseProduct.First(tp => tp.ProductId == product.Id); stockPurchaseProduct.QuantityBought -= quantity; - product.InStock -= quantity; - + TotalAmount -= product.CostPrice * quantity; return stockPurchaseProduct; } @@ -104,40 +112,31 @@ public override string ToString() // id value object public class StockPurchaseProduct : IStockPurchaseProduct { - internal StockPurchaseProduct(StockPurchase stockPurchase, IProduct product) + internal StockPurchaseProduct(IProduct product) { - _stockPurchase = stockPurchase; ProductId = product.Id; - Name = product.Name; Price = product.CostPrice; Barcode = product.Barcode; QuantityBought = 1; } - private StockPurchase _stockPurchase; - + internal StockPurchaseProduct (Guid productId, string barcode, string name, decimal price, int quantityBought) + { + ProductId = productId; + Name = name; + Price = price; + QuantityBought = quantityBought; + Barcode = barcode; + } + public Guid ProductId { get; } public string Name { get; } public decimal Price { get; } - private int _quantityBought; - public int QuantityBought - { - get => _quantityBought; - internal set - { - decimal oldTotalPrice = TotalCost; - _quantityBought = value; - decimal newTotalPrice = TotalCost; - - _stockPurchase.TotalAmount = _stockPurchase.TotalAmount - oldTotalPrice + newTotalPrice; - - } - } - + public int QuantityBought { get; internal set; } public decimal TotalCost => Price * QuantityBought; diff --git a/StoreManagementX.Domain/Aggregates/Roots/Transactions/PayLater.cs b/StoreManagementX.Domain/Aggregates/Roots/Transactions/PayLater.cs index 83b8cb7..791ea91 100644 --- a/StoreManagementX.Domain/Aggregates/Roots/Transactions/PayLater.cs +++ b/StoreManagementX.Domain/Aggregates/Roots/Transactions/PayLater.cs @@ -9,17 +9,24 @@ namespace StoreManagementSystemX.Domain.Aggregates.Roots.Transactions { public class PayLater : IPayLater { - public PayLater(string customerName) + internal PayLater(string customerName) { CustomerName = customerName; IsPaid = false; } - public string CustomerName { get; set; } = String.Empty; + internal PayLater(string customerName, bool isPaid, DateTime? paidAt) + { + CustomerName = customerName; + IsPaid = isPaid; + PaidAt = paidAt; + } + + public string CustomerName { get; internal set; } = String.Empty; public bool IsPaid { get; internal set; } - public DateTime? PaidAt { get; set; } + public DateTime? PaidAt { get; internal set; } } } diff --git a/StoreManagementX.Domain/Aggregates/Roots/Transactions/Transaction.cs b/StoreManagementX.Domain/Aggregates/Roots/Transactions/Transaction.cs index 3c15ec0..d504fac 100644 --- a/StoreManagementX.Domain/Aggregates/Roots/Transactions/Transaction.cs +++ b/StoreManagementX.Domain/Aggregates/Roots/Transactions/Transaction.cs @@ -24,6 +24,17 @@ internal Transaction(Guid sellerId, Guid id, PayLaterFactory payLaterFactory) SellerId = sellerId; DateTime = DateTime.Now; _payLaterFactory = payLaterFactory; + _transactionProducts = new List(); + } + + internal Transaction(Guid sellerId, Guid id, DateTime dateTime, PayLater? payLater, List transactionProducts, PayLaterFactory payLaterFactory) + { + SellerId = sellerId; + Id = id; + DateTime = dateTime; + _payLater = payLater; + _transactionProducts = transactionProducts; + _payLaterFactory = payLaterFactory; } private readonly PayLaterFactory _payLaterFactory; @@ -32,13 +43,13 @@ internal Transaction(Guid sellerId, Guid id, PayLaterFactory payLaterFactory) public Guid Id { get; } - private IList _transactionProducts = new List(); + private IList _transactionProducts; public IReadOnlyList TransactionProducts => _transactionProducts.AsReadOnly(); public decimal TotalAmount { get; private set; } - private PayLater _payLater { get; set; } + private PayLater? _payLater { get; set; } public IPayLater? PayLater => _payLater; @@ -50,9 +61,10 @@ public ITransactionProduct AddProduct(IProduct product) if (matchedProduct == null) // new product added { - var transactionProduct = new TransactionProduct(this, product); + var transactionProduct = new TransactionProduct(product); _transactionProducts.Add(transactionProduct); product.InStock -= 1; + TotalAmount += product.SellingPrice; return transactionProduct; } else { @@ -63,18 +75,27 @@ public ITransactionProduct AddProduct(IProduct product) public ITransactionProduct IncrementProduct(IProduct product, int quantity = 1) { var transactionProduct = _transactionProducts.First(tp => tp.ProductId == product.Id); + transactionProduct.QuantityBought += quantity; product.InStock -= quantity; + TotalAmount += product.SellingPrice * quantity; + return transactionProduct; } public ITransactionProduct DecrementProduct(IProduct product, int quantity = 1) { var transactionProduct = _transactionProducts.First(tp => tp.ProductId == product.Id); + + if (quantity < 0 || quantity > transactionProduct.QuantityBought) + throw new ArgumentOutOfRangeException("Invalid Quantity argument"); + transactionProduct.QuantityBought -= quantity; product.InStock += quantity; + TotalAmount -= product.SellingPrice * quantity; + return transactionProduct; } @@ -83,6 +104,7 @@ public ITransactionProduct RemoveProduct(IProduct product) var transactionProductFound = _transactionProducts.First(); product.InStock += transactionProductFound.QuantityBought; _transactionProducts.Remove(transactionProductFound); + TotalAmount -= transactionProductFound.TotalPrice; return transactionProductFound; @@ -90,7 +112,11 @@ public ITransactionProduct RemoveProduct(IProduct product) public void MarkAsPaid() { - _payLater.IsPaid = true; + if(_payLater != null) + { + _payLater.IsPaid = true; + _payLater.PaidAt = DateTime.Now; + } } public override bool Equals(object? obj) @@ -108,28 +134,33 @@ public override int GetHashCode() public override string ToString() => $"{nameof(Transaction)}: {Id} - Total Amount: {TotalAmount}"; + public void SetPayLaterDetails(string customerName) { _payLater = (PayLater) _payLaterFactory.Create(customerName); } - // id value object public class TransactionProduct : ITransactionProduct { - internal TransactionProduct(Transaction transaction, IProduct product) + internal TransactionProduct(IProduct product) { - _transaction = transaction; ProductId = product.Id; - ProductName = product.Name; CostPrice = product.CostPrice; SellingPrice = product.SellingPrice; QuantityBought = 1; } - private Transaction _transaction; - + internal TransactionProduct(Guid productId, string productName, decimal costPrice, decimal sellingPrice, int quantityBought) + { + ProductId = productId; + ProductName = productName; + CostPrice = costPrice; + SellingPrice = sellingPrice; + QuantityBought = quantityBought; + } + public Guid ProductId { get; } public string ProductName { get; } @@ -138,20 +169,7 @@ internal TransactionProduct(Transaction transaction, IProduct product) public decimal SellingPrice { get; } - private int _quantityBought; - public int QuantityBought - { - get => _quantityBought; - internal set - { - decimal oldTotalPrice = TotalPrice; - _quantityBought = value; - decimal newTotalPrice = TotalPrice; - - _transaction.TotalAmount = _transaction.TotalAmount - oldTotalPrice + newTotalPrice; - - } - } + public int QuantityBought { get; internal set; } public decimal TotalPrice => SellingPrice * QuantityBought; diff --git a/StoreManagementX.Domain/Aggregates/Roots/Users/Interfaces/IUser.cs b/StoreManagementX.Domain/Aggregates/Roots/Users/Interfaces/IUser.cs index 36d5495..7e08488 100644 --- a/StoreManagementX.Domain/Aggregates/Roots/Users/Interfaces/IUser.cs +++ b/StoreManagementX.Domain/Aggregates/Roots/Users/Interfaces/IUser.cs @@ -14,8 +14,12 @@ public interface IUser { public Guid Id { get; } + public Guid CreatorId { get; } + public string Username { get; set; } + public string Password { get; } + public void ChangePassword(string password); public IUserFactory UserFactory { get; } diff --git a/StoreManagementX.Domain/Aggregates/Roots/Users/User.cs b/StoreManagementX.Domain/Aggregates/Roots/Users/User.cs index 133c8f6..5c4481d 100644 --- a/StoreManagementX.Domain/Aggregates/Roots/Users/User.cs +++ b/StoreManagementX.Domain/Aggregates/Roots/Users/User.cs @@ -46,7 +46,7 @@ internal User(Guid creatorId, Guid id, string username, string password, IUserFa public IStockPurchaseFactory StockPurchaseFactory { get; internal set; } - internal string Password; + public string Password { get; private set; } public void ChangePassword(string password) { diff --git a/StoreManagementX.Domain/Factories/Products/Interfaces/IProductFactory.cs b/StoreManagementX.Domain/Factories/Products/Interfaces/IProductFactory.cs index b2ca1a1..024da7e 100644 --- a/StoreManagementX.Domain/Factories/Products/Interfaces/IProductFactory.cs +++ b/StoreManagementX.Domain/Factories/Products/Interfaces/IProductFactory.cs @@ -12,5 +12,6 @@ public interface IProductFactory { public IProduct Create(ICreateProductArgs createProductArgs); + public IProduct Reconstitute(IProductReconstitutionArgs productReconstitutionArgs); } } diff --git a/StoreManagementX.Domain/Factories/Products/Interfaces/IProductReconstitutionArgs.cs b/StoreManagementX.Domain/Factories/Products/Interfaces/IProductReconstitutionArgs.cs new file mode 100644 index 0000000..4591827 --- /dev/null +++ b/StoreManagementX.Domain/Factories/Products/Interfaces/IProductReconstitutionArgs.cs @@ -0,0 +1,19 @@ +namespace StoreManagementSystemX.Domain.Factories.Products.Interfaces +{ + public interface IProductReconstitutionArgs + { + public Guid Id { get; } + + public string Barcode { get; } + + public string Name { get; set; } + + public decimal CostPrice { get; set; } + + public decimal SellingPrice { get; set; } + + public int InStock { get; set; } + + public Guid CreatorId { get; } + } +} \ No newline at end of file diff --git a/StoreManagementX.Domain/Factories/Products/ProductFactory.cs b/StoreManagementX.Domain/Factories/Products/ProductFactory.cs index 9f15c59..bc39828 100644 --- a/StoreManagementX.Domain/Factories/Products/ProductFactory.cs +++ b/StoreManagementX.Domain/Factories/Products/ProductFactory.cs @@ -29,5 +29,18 @@ public IProduct Create(ICreateProductArgs args) return new Product(args.CreatorId, Guid.NewGuid(), args.Barcode, args.Name, args.CostPrice, args.SellingPrice); } } + + public IProduct Reconstitute(IProductReconstitutionArgs productReconstitutionArgs) + { + return new Product( + productReconstitutionArgs.CreatorId, + productReconstitutionArgs.Id, + productReconstitutionArgs.Barcode, + productReconstitutionArgs.Name, + productReconstitutionArgs.CostPrice, + productReconstitutionArgs.SellingPrice, + productReconstitutionArgs.InStock + ); + } } } diff --git a/StoreManagementX.Domain/Factories/StockPurchases/Interfaces/IStockPurchaseFactory.cs b/StoreManagementX.Domain/Factories/StockPurchases/Interfaces/IStockPurchaseFactory.cs index d367e53..ca70d69 100644 --- a/StoreManagementX.Domain/Factories/StockPurchases/Interfaces/IStockPurchaseFactory.cs +++ b/StoreManagementX.Domain/Factories/StockPurchases/Interfaces/IStockPurchaseFactory.cs @@ -10,5 +10,7 @@ namespace StoreManagementSystemX.Domain.Factories.StockPurchases.Interfaces public interface IStockPurchaseFactory { public IStockPurchase Create(Guid stockManagerId); + public IStockPurchase Reconstitute(IStockPurchaseReconstitutionArgs args); } + } diff --git a/StoreManagementX.Domain/Factories/StockPurchases/Interfaces/IStockPurchaseProductReconstitutionArgs.cs b/StoreManagementX.Domain/Factories/StockPurchases/Interfaces/IStockPurchaseProductReconstitutionArgs.cs new file mode 100644 index 0000000..cf9e48a --- /dev/null +++ b/StoreManagementX.Domain/Factories/StockPurchases/Interfaces/IStockPurchaseProductReconstitutionArgs.cs @@ -0,0 +1,17 @@ +namespace StoreManagementSystemX.Domain.Factories.StockPurchases.Interfaces +{ + public interface IStockPurchaseProductReconstitutionArgs + { + public Guid ProductId { get; } + + public string Barcode { get; } + + public string Name { get; } + + public decimal Price { get; } + + public int QuantityBought { get; } + + + } +} \ No newline at end of file diff --git a/StoreManagementX.Domain/Factories/StockPurchases/Interfaces/IStockPurchaseReconstitutionArgs.cs b/StoreManagementX.Domain/Factories/StockPurchases/Interfaces/IStockPurchaseReconstitutionArgs.cs new file mode 100644 index 0000000..7717164 --- /dev/null +++ b/StoreManagementX.Domain/Factories/StockPurchases/Interfaces/IStockPurchaseReconstitutionArgs.cs @@ -0,0 +1,15 @@ +using static StoreManagementSystemX.Domain.Aggregates.Roots.StockPurchases.StockPurchase; + +namespace StoreManagementSystemX.Domain.Factories.StockPurchases.Interfaces +{ + public interface IStockPurchaseReconstitutionArgs + { + public Guid StockManagerId { get; } + + public Guid Id { get; } + + public DateTime DateTime { get; } + + public IEnumerable StockPurchaseProducts { get; } + } +} \ No newline at end of file diff --git a/StoreManagementX.Domain/Factories/StockPurchases/StockPurchaseFactory.cs b/StoreManagementX.Domain/Factories/StockPurchases/StockPurchaseFactory.cs index d84ea79..15b8db1 100644 --- a/StoreManagementX.Domain/Factories/StockPurchases/StockPurchaseFactory.cs +++ b/StoreManagementX.Domain/Factories/StockPurchases/StockPurchaseFactory.cs @@ -6,6 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using static StoreManagementSystemX.Domain.Aggregates.Roots.StockPurchases.StockPurchase; namespace StoreManagementSystemX.Domain.Factories.StockPurchases { @@ -15,5 +16,27 @@ public IStockPurchase Create(Guid stockManagerId) { return new StockPurchase(stockManagerId, Guid.NewGuid()); } + + public IStockPurchase Reconstitute(IStockPurchaseReconstitutionArgs args) + { + var stockPurchaseProducts = new List(); + foreach(var stockPurchaseProductDTO in args.StockPurchaseProducts) + { + stockPurchaseProducts.Add(new StockPurchaseProduct( + stockPurchaseProductDTO.ProductId, + stockPurchaseProductDTO.Barcode, + stockPurchaseProductDTO.Name, + stockPurchaseProductDTO.Price, + stockPurchaseProductDTO.QuantityBought + )); + } + return new StockPurchase( + args.StockManagerId, + args.Id, + args.DateTime, + args.StockPurchaseProducts.Sum(e => e.Price * e.QuantityBought), + stockPurchaseProducts + ); + } } } diff --git a/StoreManagementX.Domain/Factories/Transactions/Interfaces/IPayLaterFactory.cs b/StoreManagementX.Domain/Factories/Transactions/Interfaces/IPayLaterFactory.cs index de6c76f..ed6069d 100644 --- a/StoreManagementX.Domain/Factories/Transactions/Interfaces/IPayLaterFactory.cs +++ b/StoreManagementX.Domain/Factories/Transactions/Interfaces/IPayLaterFactory.cs @@ -10,5 +10,7 @@ namespace StoreManagementSystemX.Domain.Factories.Transactions.Interfaces public interface IPayLaterFactory { public IPayLater Create(string customerName); + + public IPayLater Reconstitute(IPayLaterReconstitutionArgs args); } } diff --git a/StoreManagementX.Domain/Factories/Transactions/Interfaces/IPayLaterReconstitutionArgs.cs b/StoreManagementX.Domain/Factories/Transactions/Interfaces/IPayLaterReconstitutionArgs.cs new file mode 100644 index 0000000..5977be5 --- /dev/null +++ b/StoreManagementX.Domain/Factories/Transactions/Interfaces/IPayLaterReconstitutionArgs.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StoreManagementSystemX.Domain.Factories.Transactions.Interfaces +{ + public interface IPayLaterReconstitutionArgs + { + public string CustomerName { get; } + + public bool IsPaid { get; } + + public DateTime? PaidAt { get; } + } +} diff --git a/StoreManagementX.Domain/Factories/Transactions/Interfaces/ITransactionFactory.cs b/StoreManagementX.Domain/Factories/Transactions/Interfaces/ITransactionFactory.cs index 5390eaa..5945144 100644 --- a/StoreManagementX.Domain/Factories/Transactions/Interfaces/ITransactionFactory.cs +++ b/StoreManagementX.Domain/Factories/Transactions/Interfaces/ITransactionFactory.cs @@ -11,5 +11,7 @@ namespace StoreManagementSystemX.Domain.Factories.Transactions.Interfaces public interface ITransactionFactory { public ITransaction Create(Guid sellerId); + + public ITransaction Reconstitute(ITransactionReconstitutionArgs transactionReconstitutionArgs); } } diff --git a/StoreManagementX.Domain/Factories/Transactions/Interfaces/ITransactionProductReconstitutionArgs.cs b/StoreManagementX.Domain/Factories/Transactions/Interfaces/ITransactionProductReconstitutionArgs.cs new file mode 100644 index 0000000..a804644 --- /dev/null +++ b/StoreManagementX.Domain/Factories/Transactions/Interfaces/ITransactionProductReconstitutionArgs.cs @@ -0,0 +1,15 @@ +namespace StoreManagementSystemX.Domain.Factories.Transactions.Interfaces +{ + public interface ITransactionProductReconstitutionArgs + { + public Guid ProductId { get; } + + public string ProductName { get; } + + public decimal CostPrice { get; } + + public decimal SellingPrice { get; } + + public int QuantityBought { get; } + } +} \ No newline at end of file diff --git a/StoreManagementX.Domain/Factories/Transactions/Interfaces/ITransactionReconstitutionArgs.cs b/StoreManagementX.Domain/Factories/Transactions/Interfaces/ITransactionReconstitutionArgs.cs new file mode 100644 index 0000000..ff71a07 --- /dev/null +++ b/StoreManagementX.Domain/Factories/Transactions/Interfaces/ITransactionReconstitutionArgs.cs @@ -0,0 +1,18 @@ +using StoreManagementSystemX.Domain.Aggregates.Roots.Products.Interfaces; +using StoreManagementSystemX.Domain.Aggregates.Roots.Transactions.Interfaces; + +namespace StoreManagementSystemX.Domain.Factories.Transactions.Interfaces +{ + public interface ITransactionReconstitutionArgs + { + public Guid SellerId { get; } + + public DateTime DateTime { get; } + + public Guid Id { get; } + + public IPayLaterReconstitutionArgs? PayLater { get; } + + public IEnumerable TransactionProducts { get; } + } +} \ No newline at end of file diff --git a/StoreManagementX.Domain/Factories/Transactions/Interfaces/PayLaterFactory.cs b/StoreManagementX.Domain/Factories/Transactions/Interfaces/PayLaterFactory.cs index 8952e7d..ac1f981 100644 --- a/StoreManagementX.Domain/Factories/Transactions/Interfaces/PayLaterFactory.cs +++ b/StoreManagementX.Domain/Factories/Transactions/Interfaces/PayLaterFactory.cs @@ -19,5 +19,14 @@ public IPayLater Create(string customerName) { return new PayLater(customerName); } + + public IPayLater Reconstitute(IPayLaterReconstitutionArgs args) + { + return new PayLater( + args.CustomerName, + args.IsPaid, + args.PaidAt + ); + } } } diff --git a/StoreManagementX.Domain/Factories/Transactions/TransactionFactory.cs b/StoreManagementX.Domain/Factories/Transactions/TransactionFactory.cs index 657c573..69d99f9 100644 --- a/StoreManagementX.Domain/Factories/Transactions/TransactionFactory.cs +++ b/StoreManagementX.Domain/Factories/Transactions/TransactionFactory.cs @@ -6,6 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using static StoreManagementSystemX.Domain.Aggregates.Roots.Transactions.Transaction; namespace StoreManagementSystemX.Domain.Factories.Transactions { @@ -22,5 +23,43 @@ public ITransaction Create(Guid sellerId) { return new Transaction(sellerId, Guid.NewGuid(), _payLaterFactory); } + + public ITransaction Reconstitute(ITransactionReconstitutionArgs transactionReconstitutionArgs) + { + + PayLater? payLater = null; + if (transactionReconstitutionArgs.PayLater != null) + { + + payLater = new PayLater( + transactionReconstitutionArgs.PayLater.CustomerName, + transactionReconstitutionArgs.PayLater.IsPaid, + transactionReconstitutionArgs.PayLater.PaidAt + ); + } + + var transactionProducts = new List(); + foreach(var transactionProductReconstitutionArgs in transactionReconstitutionArgs.TransactionProducts) + { + transactionProducts.Add(new TransactionProduct( + transactionProductReconstitutionArgs.ProductId, + transactionProductReconstitutionArgs.ProductName, + transactionProductReconstitutionArgs.CostPrice, + transactionProductReconstitutionArgs.SellingPrice, + transactionProductReconstitutionArgs.QuantityBought + ) + ); + } + + return new Transaction( + transactionReconstitutionArgs.SellerId, + transactionReconstitutionArgs.Id, + transactionReconstitutionArgs.DateTime, + payLater, + transactionProducts, + _payLaterFactory + + ); + } } } diff --git a/StoreManagementX.Domain/Factories/Users/Interfaces/IUserFactory.cs b/StoreManagementX.Domain/Factories/Users/Interfaces/IUserFactory.cs index cd4ffe6..d9cdaa4 100644 --- a/StoreManagementX.Domain/Factories/Users/Interfaces/IUserFactory.cs +++ b/StoreManagementX.Domain/Factories/Users/Interfaces/IUserFactory.cs @@ -11,5 +11,7 @@ namespace StoreManagementSystemX.Domain.Factories.Users.Interfaces public interface IUserFactory { public IUser Create(ICreateUserArgs createUserArgs); + + public IUser Reconstitute(IUserReconstitutionArgs reconstituteArgs); } } diff --git a/StoreManagementX.Domain/Factories/Users/Interfaces/IUserReconstitutionArgs.cs b/StoreManagementX.Domain/Factories/Users/Interfaces/IUserReconstitutionArgs.cs new file mode 100644 index 0000000..b13dec6 --- /dev/null +++ b/StoreManagementX.Domain/Factories/Users/Interfaces/IUserReconstitutionArgs.cs @@ -0,0 +1,13 @@ +namespace StoreManagementSystemX.Domain.Factories.Users.Interfaces +{ + public interface IUserReconstitutionArgs + { + Guid Id { get; } + + Guid? CreatorId { get; } + + string Username { get; } + + string Password { get; } + } +} \ No newline at end of file diff --git a/StoreManagementX.Domain/Factories/Users/UserFactory.cs b/StoreManagementX.Domain/Factories/Users/UserFactory.cs index 8aa40e4..ff08bef 100644 --- a/StoreManagementX.Domain/Factories/Users/UserFactory.cs +++ b/StoreManagementX.Domain/Factories/Users/UserFactory.cs @@ -28,9 +28,24 @@ public UserFactory(IProductFactory productFactory, ITransactionFactory transacti _transactionFactory = transactionFactory; _stockPurchaseFactory = stockPurchaseFactory; } + public IUser Create(ICreateUserArgs createUserArgs) { return new User(createUserArgs.CreatorId, Guid.NewGuid(), createUserArgs.Username, createUserArgs.Password, this, _productFactory, _transactionFactory, _stockPurchaseFactory); } + + public IUser Reconstitute(IUserReconstitutionArgs userReconstitutionArgs) + { + return new User( + userReconstitutionArgs.CreatorId ?? Guid.Empty, + userReconstitutionArgs.Id, + userReconstitutionArgs.Username, + userReconstitutionArgs.Password, + this, + _productFactory, + _transactionFactory, + _stockPurchaseFactory + ); + } } } diff --git a/StoreManagementX.Domain/Program.cs b/StoreManagementX.Domain/Program.cs index 2af2347..28714f0 100644 --- a/StoreManagementX.Domain/Program.cs +++ b/StoreManagementX.Domain/Program.cs @@ -10,7 +10,7 @@ using StoreManagementSystemX.Services; var productRepository = new ProductRepository(); -var barcodeGenerationService = new BarcodeGenerationService(productRepository); +var barcodeGenerationService = new BarcodeGenerationService(); var productFactory = new ProductFactory(barcodeGenerationService); var payLaterFactory = new PayLaterFactory(); var transactionFactory = new TransactionFactory(payLaterFactory); diff --git a/StoreManagementX.Domain/Repositories/Interfaces/IRepository.cs b/StoreManagementX.Domain/Repositories/Interfaces/IRepository.cs index 3daef66..ce43011 100644 --- a/StoreManagementX.Domain/Repositories/Interfaces/IRepository.cs +++ b/StoreManagementX.Domain/Repositories/Interfaces/IRepository.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; @@ -18,5 +19,7 @@ public interface IRepository where TEntity : class public TEntity? GetById(Guid id); public IEnumerable GetAll(); + + } } diff --git a/StoreManagementX.Domain/Repositories/Transactions/Interfaces/ITransactionRepository.cs b/StoreManagementX.Domain/Repositories/Transactions/Interfaces/ITransactionRepository.cs index dfa2589..83290f9 100644 --- a/StoreManagementX.Domain/Repositories/Transactions/Interfaces/ITransactionRepository.cs +++ b/StoreManagementX.Domain/Repositories/Transactions/Interfaces/ITransactionRepository.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; @@ -10,5 +11,6 @@ namespace StoreManagementSystemX.Domain.Repositories.Transactions.Interfaces { public interface ITransactionRepository : IRepository { + public IEnumerable GetTransactionsToday(); } } diff --git a/StoreManagementX.Domain/Repositories/Transactions/TransactionRepository.cs b/StoreManagementX.Domain/Repositories/Transactions/TransactionRepository.cs index ce1b38e..2e243af 100644 --- a/StoreManagementX.Domain/Repositories/Transactions/TransactionRepository.cs +++ b/StoreManagementX.Domain/Repositories/Transactions/TransactionRepository.cs @@ -34,6 +34,11 @@ public IEnumerable GetAll() return _transactions.Find(t => t.Id == id); } + public IEnumerable GetTransactionsToday() + { + throw new NotImplementedException(); + } + public void Remove(Guid id) { var transactionToRemove = _transactions.Find(t => t.Id == id); diff --git a/StoreManagementX.Domain/Services/Barcode/BarcodeGenerationService.cs b/StoreManagementX.Domain/Services/Barcode/BarcodeGenerationService.cs index 69ca912..c17b625 100644 --- a/StoreManagementX.Domain/Services/Barcode/BarcodeGenerationService.cs +++ b/StoreManagementX.Domain/Services/Barcode/BarcodeGenerationService.cs @@ -15,13 +15,11 @@ public class BarcodeGenerationService : IBarcodeGenerationService { private static readonly Random _random = new Random(); private static readonly string BUSINESS_PREFIX = "6390"; - private readonly IProductRepository _productRepository; // this service has a uses the EAN-13 which is a 13-digit format // consisting of 12 numeric character + 1 error check bit - public BarcodeGenerationService(IProductRepository productRepository) + public BarcodeGenerationService() { - _productRepository = productRepository; } private string GenerateTwelveDigitString() @@ -48,9 +46,10 @@ public string GenerateBarcode() private bool IsUnique(string barcode) { // check for barcode collision - var matchedProduct = _productRepository.GetByBarcode(barcode); + //var matchedProduct = _productRepository.GetByBarcode(barcode); - return matchedProduct == null; + //return matchedProduct == null; + return true; } private string GenerateCheckDigit(string barcodeString)