├── LICENSE ├── README.md ├── diagram ├── ElectroProject.ClassDiagram.v1.0.mdj ├── ElectroProject.ClassDiagram.v1.1.mdj ├── ElectroProject.DatabaseDiagram.v1.0.mdj ├── ElectroProject.SequenceDiagram.v1.0.mdj ├── ElectroProject.SequenceDiagram.v1.1.mdj ├── ElectroProject.UseCaseDiagram.v1.0.mdj ├── ElectroProject.UseCaseDiagram.v1.1.mdj ├── ElectroProject.UseCaseDiagram.v1.2.mdj ├── ElectroProject.UseCaseDiagram.v1.3.mdj ├── ElectroProject.UseCaseDiagram.v1.4.mdj └── ElectroProject.UserFlow.v1.0.mdj ├── docker-compose.yml ├── electro-client ├── .dockerignore ├── .eslintrc.json ├── .gitignore ├── .idea │ ├── .gitignore │ ├── codeStyles │ │ ├── Project.xml │ │ └── codeStyleConfig.xml │ ├── inspectionProfiles │ │ └── Project_Default.xml │ ├── jpa-buddy.xml │ ├── misc.xml │ ├── modules.xml │ └── vcs.xml ├── Dockerfile ├── README.md ├── electro-client.iml ├── nginx.conf ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── robots.txt ├── src │ ├── App.test.tsx │ ├── App.tsx │ ├── components │ │ ├── AddVariantsModal │ │ │ └── AddVariantsModal.tsx │ │ ├── AdminError │ │ │ └── AdminError.tsx │ │ ├── ClientCarousel │ │ │ └── ClientCarousel.tsx │ │ ├── ClientError │ │ │ └── ClientError.tsx │ │ ├── ClientFooter │ │ │ └── ClientFooter.tsx │ │ ├── ClientHeader │ │ │ ├── CategoryMenu.tsx │ │ │ └── ClientHeader.tsx │ │ ├── ClientProductCard │ │ │ └── ClientProductCard.tsx │ │ ├── ClientUserNavbar │ │ │ └── ClientUserNavbar.tsx │ │ ├── CreateUpdateTitle │ │ │ └── CreateUpdateTitle.tsx │ │ ├── DefaultHeader │ │ │ └── DefaultHeader.tsx │ │ ├── DefaultNavbar │ │ │ ├── DefaultNavbar.styles.ts │ │ │ └── DefaultNavbar.tsx │ │ ├── DefaultPropertyPanel │ │ │ └── DefaultPropertyPanel.tsx │ │ ├── ElectroLogo │ │ │ └── ElectroLogo.tsx │ │ ├── EntityDetailTable │ │ │ └── EntityDetailTable.tsx │ │ ├── EntityFinder │ │ │ └── EntityFinder.tsx │ │ ├── FilterCriteriaRow │ │ │ ├── FilterCriteriaRow.tsx │ │ │ └── FilterCriteriaRow.vm.ts │ │ ├── FilterPanel │ │ │ ├── FilterPanel.styles.ts │ │ │ └── FilterPanel.tsx │ │ ├── FilterPanelHeader │ │ │ └── FilterPanelHeader.tsx │ │ ├── FilterPanelHeaderLeft │ │ │ └── FilterPanelHeaderLeft.tsx │ │ ├── FilterPanelHeaderRight │ │ │ ├── FilterPanelHeaderRight.tsx │ │ │ └── FilterPanelHeaderRight.vm.ts │ │ ├── FilterPanelMain │ │ │ └── FilterPanelMain.tsx │ │ ├── FilterPanelMainLeft │ │ │ ├── FilterPanelMainLeft.tsx │ │ │ └── FilterPanelMainLeft.vm.ts │ │ ├── FilterPanelMainRight │ │ │ ├── FilterPanelMainRight.tsx │ │ │ └── FilterPanelMainRight.vm.ts │ │ ├── FloatingCodeFrame │ │ │ └── FloatingCodeFrame.tsx │ │ ├── LoadingMiddleware │ │ │ └── LoadingMiddleware.tsx │ │ ├── ManageHeader │ │ │ └── ManageHeader.tsx │ │ ├── ManageHeaderButtons │ │ │ ├── ManageHeaderButtons.tsx │ │ │ └── ManageHeaderButtons.vm.tsx │ │ ├── ManageHeaderTitle │ │ │ └── ManageHeaderTitle.tsx │ │ ├── ManageMain │ │ │ └── ManageMain.tsx │ │ ├── ManagePagination │ │ │ ├── ManagePagination.tsx │ │ │ └── ManagePagination.vm.ts │ │ ├── ManageTable │ │ │ ├── ManageTable.styles.ts │ │ │ ├── ManageTable.tsx │ │ │ └── ManageTable.vm.tsx │ │ ├── ProductImagesDropzone │ │ │ └── ProductImagesDropzone.tsx │ │ ├── ProductProperties │ │ │ └── ProductProperties.tsx │ │ ├── ProductPropertyRow │ │ │ └── ProductPropertyRow.tsx │ │ ├── ProductSpecificationRow │ │ │ └── ProductSpecificationRow.tsx │ │ ├── ProductSpecifications │ │ │ └── ProductSpecifications.tsx │ │ ├── ProductVariantRow │ │ │ └── ProductVariantRow.tsx │ │ ├── ProductVariants │ │ │ └── ProductVariants.tsx │ │ ├── ProductVariantsForUpdate │ │ │ └── ProductVariantsForUpdate.tsx │ │ ├── ProtectedRoute │ │ │ └── ProtectedRoute.tsx │ │ ├── ReviewStarGroup │ │ │ └── ReviewStarGroup.tsx │ │ ├── ScrollToTop │ │ │ └── ScrollToTop.tsx │ │ ├── SearchPanel │ │ │ ├── SearchPanel.tsx │ │ │ └── SearchPanel.vm.ts │ │ ├── SortCriteriaRow │ │ │ ├── SortCriteriaRow.tsx │ │ │ └── SortCriteriaRow.vm.ts │ │ ├── VariantFinder │ │ │ └── VariantFinder.tsx │ │ ├── VariantTable │ │ │ └── VariantTable.tsx │ │ ├── VariantTablePopover │ │ │ └── VariantTablePopover.tsx │ │ └── index.ts │ ├── constants │ │ ├── ApplicationConstants.ts │ │ ├── ManagerPath.ts │ │ ├── ResourceURL.ts │ │ └── Titles.ts │ ├── hooks │ │ ├── use-create-api.ts │ │ ├── use-create-preorder-api.tsx │ │ ├── use-create-wish-api.tsx │ │ ├── use-delete-by-id-api.ts │ │ ├── use-delete-by-ids-api.ts │ │ ├── use-get-all-api.ts │ │ ├── use-get-by-id-api.ts │ │ ├── use-init-filter-panel-state.ts │ │ ├── use-list-response.ts.txt │ │ ├── use-reset-manage-page-state.ts │ │ ├── use-save-cart-api.tsx │ │ ├── use-select-address.ts │ │ ├── use-title.ts │ │ ├── use-update-api.ts │ │ └── use-upload-multiple-images-api.ts │ ├── index.css │ ├── index.tsx │ ├── models │ │ ├── Address.ts │ │ ├── Authentication.ts │ │ ├── BaseResponse.ts │ │ ├── Brand.ts │ │ ├── Category.ts │ │ ├── Count.ts │ │ ├── CountVariant.ts │ │ ├── Customer.ts │ │ ├── CustomerGroup.ts │ │ ├── CustomerResource.ts │ │ ├── CustomerStatus.ts │ │ ├── Department.ts │ │ ├── Destination.ts │ │ ├── District.ts │ │ ├── Docket.ts │ │ ├── DocketReason.ts │ │ ├── DocketVariant.ts │ │ ├── DocketVariantEliminatedResponse.ts │ │ ├── DocketVariantExtended.ts │ │ ├── Employee.ts │ │ ├── Guarantee.ts │ │ ├── Image.ts │ │ ├── JobLevel.ts │ │ ├── JobTitle.ts │ │ ├── JobType.ts │ │ ├── Message.ts │ │ ├── Notification.ts │ │ ├── Office.ts │ │ ├── Order.ts │ │ ├── OrderCancellationReason.ts │ │ ├── OrderResource.ts │ │ ├── OrderVariant.ts │ │ ├── PaymentMethod.ts │ │ ├── Product.ts │ │ ├── ProductInventory.ts │ │ ├── Promotion.ts │ │ ├── Property.ts │ │ ├── Province.ts │ │ ├── PurchaseOrder.ts │ │ ├── PurchaseOrderVariant.ts │ │ ├── Review.ts │ │ ├── RewardStrategy.ts │ │ ├── Role.ts │ │ ├── Room.ts │ │ ├── Specification.ts │ │ ├── Statistic.ts │ │ ├── Supplier.ts │ │ ├── Tag.ts │ │ ├── Transfer.ts │ │ ├── Unit.ts │ │ ├── User.ts │ │ ├── Variant.ts │ │ ├── VariantInventory.ts │ │ ├── Ward.ts │ │ ├── Warehouse.ts │ │ └── Waybill.ts │ ├── pages │ │ ├── Admin.tsx │ │ ├── AdminDashboard.tsx │ │ ├── Client.tsx │ │ ├── PageConfigs.ts │ │ ├── address │ │ │ ├── AddressConfigs.ts │ │ │ ├── AddressCreate.tsx │ │ │ ├── AddressCreate.vm.ts │ │ │ ├── AddressManage.tsx │ │ │ ├── AddressUpdate.tsx │ │ │ ├── AddressUpdate.vm.ts │ │ │ └── index.ts │ │ ├── admin-account │ │ │ ├── AdminAccount.tsx │ │ │ └── index.ts │ │ ├── admin-notification │ │ │ ├── AdminNotification.tsx │ │ │ └── index.ts │ │ ├── admin-signin │ │ │ ├── AdminSignin.tsx │ │ │ └── index.ts │ │ ├── brand │ │ │ ├── BrandConfigs.ts │ │ │ ├── BrandCreate.tsx │ │ │ ├── BrandCreate.vm.ts │ │ │ ├── BrandManage.tsx │ │ │ ├── BrandUpdate.tsx │ │ │ ├── BrandUpdate.vm.ts │ │ │ └── index.ts │ │ ├── category │ │ │ ├── CategoryConfigs.ts │ │ │ ├── CategoryCreate.tsx │ │ │ ├── CategoryCreate.vm.ts │ │ │ ├── CategoryManage.tsx │ │ │ ├── CategoryUpdate.tsx │ │ │ ├── CategoryUpdate.vm.ts │ │ │ └── index.ts │ │ ├── chat │ │ │ ├── ChatDashboard.tsx │ │ │ └── index.ts │ │ ├── client-all-categories │ │ │ ├── ClientAllCategories.tsx │ │ │ └── index.ts │ │ ├── client-cart │ │ │ ├── ClientCart.tsx │ │ │ └── index.ts │ │ ├── client-category │ │ │ ├── ClientCategory.tsx │ │ │ ├── ClientCategoryProducts.tsx │ │ │ ├── ClientCategorySkeleton.tsx │ │ │ └── index.ts │ │ ├── client-chat │ │ │ ├── ClientChat.tsx │ │ │ └── index.ts │ │ ├── client-forgot-password │ │ │ ├── ClientChangePassword.tsx │ │ │ ├── ClientForgotPassword.tsx │ │ │ └── index.ts │ │ ├── client-home │ │ │ ├── ClientHome.tsx │ │ │ ├── ClientHomeBanner.tsx │ │ │ ├── ClientHomeFeaturedCategories.tsx │ │ │ ├── ClientHomeLatestProducts.tsx │ │ │ ├── ClientHomeNewsletter.tsx │ │ │ └── index.ts │ │ ├── client-notification │ │ │ ├── ClientNotification.tsx │ │ │ └── index.ts │ │ ├── client-order-detail │ │ │ ├── ClientOrderDetail.tsx │ │ │ └── index.ts │ │ ├── client-order │ │ │ ├── ClientOrder.tsx │ │ │ └── index.ts │ │ ├── client-payment-cancel │ │ │ ├── ClientPaymentCancel.tsx │ │ │ └── index.ts │ │ ├── client-payment-success │ │ │ ├── ClientPaymentSuccess.tsx │ │ │ └── index.ts │ │ ├── client-preorder │ │ │ ├── ClientPreorder.tsx │ │ │ └── index.ts │ │ ├── client-product │ │ │ ├── ClientProduct.tsx │ │ │ ├── ClientProductDescription.tsx │ │ │ ├── ClientProductIntro.tsx │ │ │ ├── ClientProductRelatedProducts.tsx │ │ │ ├── ClientProductReviews.tsx │ │ │ ├── ClientProductSpecification.tsx │ │ │ └── index.ts │ │ ├── client-review │ │ │ ├── ClientReview.tsx │ │ │ └── index.ts │ │ ├── client-reward │ │ │ ├── ClientReward.tsx │ │ │ └── index.ts │ │ ├── client-search │ │ │ ├── ClientSearch.tsx │ │ │ └── index.ts │ │ ├── client-setting-email │ │ │ ├── ClientSettingEmail.tsx │ │ │ └── index.ts │ │ ├── client-setting-password │ │ │ ├── ClientSettingPassword.tsx │ │ │ └── index.ts │ │ ├── client-setting-personal │ │ │ ├── ClientSettingPersonal.tsx │ │ │ └── index.ts │ │ ├── client-setting-phone │ │ │ ├── ClientSettingPhone.tsx │ │ │ └── index.ts │ │ ├── client-setting │ │ │ ├── ClientSetting.tsx │ │ │ └── index.ts │ │ ├── client-signin │ │ │ ├── ClientSignin.tsx │ │ │ └── index.ts │ │ ├── client-signup │ │ │ ├── ClientSignup.tsx │ │ │ └── index.ts │ │ ├── client-user │ │ │ ├── ClientUser.tsx │ │ │ └── index.ts │ │ ├── client-wishlist │ │ │ ├── ClientWishlist.tsx │ │ │ └── index.ts │ │ ├── count │ │ │ ├── CountConfigs.ts │ │ │ ├── CountCreate.tsx │ │ │ ├── CountCreate.vm.ts │ │ │ ├── CountManage.tsx │ │ │ ├── CountUpdate.tsx │ │ │ ├── CountUpdate.vm.ts │ │ │ └── index.ts │ │ ├── customer-group │ │ │ ├── CustomerGroupConfigs.ts │ │ │ ├── CustomerGroupCreate.tsx │ │ │ ├── CustomerGroupCreate.vm.ts │ │ │ ├── CustomerGroupManage.tsx │ │ │ ├── CustomerGroupUpdate.tsx │ │ │ ├── CustomerGroupUpdate.vm.ts │ │ │ └── index.ts │ │ ├── customer-resource │ │ │ ├── CustomerResourceConfigs.ts │ │ │ ├── CustomerResourceCreate.tsx │ │ │ ├── CustomerResourceCreate.vm.ts │ │ │ ├── CustomerResourceManage.tsx │ │ │ ├── CustomerResourceUpdate.tsx │ │ │ ├── CustomerResourceUpdate.vm.ts │ │ │ └── index.ts │ │ ├── customer-status │ │ │ ├── CustomerStatusConfigs.ts │ │ │ ├── CustomerStatusCreate.tsx │ │ │ ├── CustomerStatusCreate.vm.ts │ │ │ ├── CustomerStatusManage.tsx │ │ │ ├── CustomerStatusUpdate.tsx │ │ │ ├── CustomerStatusUpdate.vm.ts │ │ │ └── index.ts │ │ ├── customer │ │ │ ├── CustomerConfigs.ts │ │ │ ├── CustomerCreate.tsx │ │ │ ├── CustomerCreate.vm.ts │ │ │ ├── CustomerManage.tsx │ │ │ ├── CustomerUpdate.tsx │ │ │ ├── CustomerUpdate.vm.ts │ │ │ └── index.ts │ │ ├── department │ │ │ ├── DepartmentConfigs.ts │ │ │ ├── DepartmentCreate.tsx │ │ │ ├── DepartmentCreate.vm.ts │ │ │ ├── DepartmentManage.tsx │ │ │ ├── DepartmentUpdate.tsx │ │ │ ├── DepartmentUpdate.vm.ts │ │ │ └── index.ts │ │ ├── destination │ │ │ ├── DestinationConfigs.ts │ │ │ ├── DestinationCreate.tsx │ │ │ ├── DestinationCreate.vm.ts │ │ │ ├── DestinationManage.tsx │ │ │ ├── DestinationUpdate.tsx │ │ │ ├── DestinationUpdate.vm.ts │ │ │ └── index.ts │ │ ├── district │ │ │ ├── DistrictConfigs.ts │ │ │ ├── DistrictCreate.tsx │ │ │ ├── DistrictCreate.vm.ts │ │ │ ├── DistrictManage.tsx │ │ │ ├── DistrictUpdate.tsx │ │ │ ├── DistrictUpdate.vm.ts │ │ │ └── index.ts │ │ ├── docket-reason │ │ │ ├── DocketReasonConfigs.ts │ │ │ ├── DocketReasonCreate.tsx │ │ │ ├── DocketReasonCreate.vm.ts │ │ │ ├── DocketReasonManage.tsx │ │ │ ├── DocketReasonUpdate.tsx │ │ │ ├── DocketReasonUpdate.vm.ts │ │ │ └── index.ts │ │ ├── docket │ │ │ ├── DocketConfigs.ts │ │ │ ├── DocketCreate.tsx │ │ │ ├── DocketCreate.vm.ts │ │ │ ├── DocketManage.tsx │ │ │ ├── DocketUpdate.tsx │ │ │ ├── DocketUpdate.vm.ts │ │ │ └── index.ts │ │ ├── employee │ │ │ ├── EmployeeConfigs.ts │ │ │ ├── EmployeeCreate.tsx │ │ │ ├── EmployeeCreate.vm.ts │ │ │ ├── EmployeeManage.tsx │ │ │ ├── EmployeeUpdate.tsx │ │ │ ├── EmployeeUpdate.vm.ts │ │ │ └── index.ts │ │ ├── guarantee │ │ │ ├── GuaranteeConfigs.ts │ │ │ ├── GuaranteeCreate.tsx │ │ │ ├── GuaranteeCreate.vm.ts │ │ │ ├── GuaranteeManage.tsx │ │ │ ├── GuaranteeUpdate.tsx │ │ │ ├── GuaranteeUpdate.vm.ts │ │ │ └── index.ts │ │ ├── inventory │ │ │ ├── InventoryConfigs.ts │ │ │ ├── InventoryManage.tsx │ │ │ └── index.ts │ │ ├── job-level │ │ │ ├── JobLevelConfigs.ts │ │ │ ├── JobLevelCreate.tsx │ │ │ ├── JobLevelCreate.vm.ts │ │ │ ├── JobLevelManage.tsx │ │ │ ├── JobLevelUpdate..tsx │ │ │ ├── JobLevelUpdate.vm.ts │ │ │ └── index.ts │ │ ├── job-title │ │ │ ├── JobTitleConfigs.ts │ │ │ ├── JobTitleCreate.tsx │ │ │ ├── JobTitleCreate.vm.ts │ │ │ ├── JobTitleManage.tsx │ │ │ ├── JobTitleUpdate.tsx │ │ │ ├── JobTitleUpdate.vm.ts │ │ │ └── index.ts │ │ ├── job-type │ │ │ ├── JobTypeConfigs.ts │ │ │ ├── JobTypeCreate.tsx │ │ │ ├── JobTypeCreate.vm.ts │ │ │ ├── JobTypeManage.tsx │ │ │ ├── JobTypeUpdate.tsx │ │ │ ├── JobTypeUpdate.vm.ts │ │ │ └── index.ts │ │ ├── office │ │ │ ├── OfficeConfigs.ts │ │ │ ├── OfficeCreate.tsx │ │ │ ├── OfficeCreate.vm.ts │ │ │ ├── OfficeManage.tsx │ │ │ ├── OfficeUpdate.tsx │ │ │ ├── OfficeUpdate.vm.ts │ │ │ └── index.ts │ │ ├── order-cancellation-reason │ │ │ ├── OrderCancellationReasonConfigs.ts │ │ │ ├── OrderCancellationReasonCreate.tsx │ │ │ ├── OrderCancellationReasonCreate.vm.ts │ │ │ ├── OrderCancellationReasonManage.tsx │ │ │ ├── OrderCancellationReasonUpdate.tsx │ │ │ ├── OrderCancellationReasonUpdate.vm.ts │ │ │ └── index.ts │ │ ├── order-resource │ │ │ ├── OrderResourceConfigs.ts │ │ │ ├── OrderResourceCreate.tsx │ │ │ ├── OrderResourceCreate.vm.ts │ │ │ ├── OrderResourceManage.tsx │ │ │ ├── OrderResourceUpdate.tsx │ │ │ ├── OrderResourceUpdate.vm.ts │ │ │ └── index.ts │ │ ├── order │ │ │ ├── OrderConfigs.tsx │ │ │ ├── OrderCreate.tsx │ │ │ ├── OrderCreate.vm.ts │ │ │ ├── OrderManage.tsx │ │ │ ├── OrderUpdate.tsx │ │ │ ├── OrderUpdate.vm.ts │ │ │ └── index.ts │ │ ├── payment-method │ │ │ ├── PaymentMethodConfigs.ts │ │ │ ├── PaymentMethodManage.tsx │ │ │ └── index.ts │ │ ├── product │ │ │ ├── ProductConfigs.ts │ │ │ ├── ProductCreate.tsx │ │ │ ├── ProductCreate.vm.ts │ │ │ ├── ProductManage.tsx │ │ │ ├── ProductUpdate.tsx │ │ │ ├── ProductUpdate.vm.ts │ │ │ └── index.ts │ │ ├── promotion │ │ │ ├── PromotionConfigs.ts │ │ │ ├── PromotionCreate.tsx │ │ │ ├── PromotionCreate.vm.ts │ │ │ ├── PromotionManage.tsx │ │ │ ├── PromotionUpdate.tsx │ │ │ ├── PromotionUpdate.vm.ts │ │ │ └── index.ts │ │ ├── property │ │ │ ├── PropertyConfigs.ts │ │ │ ├── PropertyCreate.tsx │ │ │ ├── PropertyCreate.vm.ts │ │ │ ├── PropertyManage.tsx │ │ │ ├── PropertyUpdate.tsx │ │ │ ├── PropertyUpdate.vm.ts │ │ │ └── index.ts │ │ ├── province │ │ │ ├── ProvinceConfigs.ts │ │ │ ├── ProvinceCreate.tsx │ │ │ ├── ProvinceCreate.vm.ts │ │ │ ├── ProvinceManage.tsx │ │ │ ├── ProvinceUpdate.tsx │ │ │ ├── ProvinceUpdate.vm.ts │ │ │ └── index.ts │ │ ├── purchase-order │ │ │ ├── PurchaseOrderConfigs.ts │ │ │ ├── PurchaseOrderCreate.tsx │ │ │ ├── PurchaseOrderCreate.vm.ts │ │ │ ├── PurchaseOrderManage.tsx │ │ │ ├── PurchaseOrderUpdate.tsx │ │ │ ├── PurchaseOrderUpdate.vm.ts │ │ │ └── index.ts │ │ ├── review │ │ │ ├── ReviewConfigs.ts │ │ │ ├── ReviewManage.tsx │ │ │ └── index.ts │ │ ├── reward-strategy │ │ │ ├── RewardStrategyConfigs.ts │ │ │ ├── RewardStrategyManage.tsx │ │ │ └── index.ts │ │ ├── role │ │ │ ├── RoleConfigs.ts │ │ │ ├── RoleCreate.tsx │ │ │ ├── RoleCreate.vm.ts │ │ │ ├── RoleManage.tsx │ │ │ ├── RoleUpdate.tsx │ │ │ ├── RoleUpdate.vm.ts │ │ │ └── index.ts │ │ ├── specification │ │ │ ├── SpecificationConfigs.ts │ │ │ ├── SpecificationCreate.tsx │ │ │ ├── SpecificationCreate.vm.ts │ │ │ ├── SpecificationManage.tsx │ │ │ ├── SpecificationUpdate.tsx │ │ │ ├── SpecificationUpdate.vm.ts │ │ │ └── index.ts │ │ ├── supplier │ │ │ ├── SupplierConfigs.ts │ │ │ ├── SupplierCreate.tsx │ │ │ ├── SupplierCreate.vm.ts │ │ │ ├── SupplierManage.tsx │ │ │ ├── SupplierUpdate.tsx │ │ │ ├── SupplierUpdate.vm.ts │ │ │ └── index.ts │ │ ├── tag │ │ │ ├── TagConfigs.ts │ │ │ ├── TagCreate.tsx │ │ │ ├── TagCreate.vm.ts │ │ │ ├── TagManage.tsx │ │ │ ├── TagUpdate.tsx │ │ │ ├── TagUpdate.vm.ts │ │ │ └── index.ts │ │ ├── transfer │ │ │ ├── TransferConfigs.ts │ │ │ ├── TransferCreate.tsx │ │ │ ├── TransferCreate.vm.ts │ │ │ ├── TransferManage.tsx │ │ │ ├── TransferUpdate.tsx │ │ │ ├── TransferUpdate.vm.ts │ │ │ └── index.ts │ │ ├── unit │ │ │ ├── UnitConfigs.ts │ │ │ ├── UnitCreate.tsx │ │ │ ├── UnitCreate.vm.ts │ │ │ ├── UnitManage.tsx │ │ │ ├── UnitUpdate.tsx │ │ │ ├── UnitUpdate.vm.ts │ │ │ └── index.ts │ │ ├── user │ │ │ ├── UserConfigs.ts │ │ │ ├── UserCreate.tsx │ │ │ ├── UserCreate.vm.ts │ │ │ ├── UserManage.tsx │ │ │ ├── UserUpdate.tsx │ │ │ ├── UserUpdate.vm.ts │ │ │ └── index.ts │ │ ├── voucher │ │ │ ├── VoucherManage.tsx │ │ │ └── index.ts │ │ ├── ward │ │ │ └── WardConfigs.ts │ │ ├── warehouse │ │ │ ├── WarehouseConfigs.ts │ │ │ ├── WarehouseCreate.tsx │ │ │ ├── WarehouseCreate.vm.ts │ │ │ ├── WarehouseManage.tsx │ │ │ ├── WarehouseUpdate.tsx │ │ │ ├── WarehouseUpdate.vm.ts │ │ │ └── index.ts │ │ └── waybill │ │ │ ├── WaybillConfigs.ts │ │ │ ├── WaybillCreate.tsx │ │ │ ├── WaybillCreate.vm.ts │ │ │ ├── WaybillManage.tsx │ │ │ ├── WaybillUpdate.tsx │ │ │ ├── WaybillUpdate.vm.ts │ │ │ └── index.ts │ ├── react-app-env.d.ts │ ├── reportWebVitals.ts │ ├── setupTests.ts │ ├── stores │ │ ├── create-admin-site-slice.ts │ │ ├── create-manage-page-slice.ts │ │ ├── use-admin-auth-store.ts │ │ ├── use-app-store.ts │ │ ├── use-auth-store.ts │ │ ├── use-client-category-store.ts │ │ ├── use-client-site-store.ts │ │ └── use-filter-panel-store.ts │ ├── types │ │ ├── ClientUI.ts │ │ ├── CollectionWrapper.ts │ │ ├── Configs.ts │ │ ├── EntityProperty.ts │ │ ├── FileWithPreview.ts │ │ ├── SelectOption.ts │ │ ├── TitleLink.ts │ │ ├── Utility.ts │ │ └── index.ts │ └── utils │ │ ├── DateUtils.ts │ │ ├── FetchUtils.ts │ │ ├── FilterUtils.ts │ │ ├── MessageUtils.ts │ │ ├── MiscUtils.ts │ │ ├── MockUtils.ts │ │ └── NotifyUtils.tsx └── tsconfig.json ├── electro-server ├── .dockerignore ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── Dockerfile ├── lombok.config ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── electro │ │ │ ├── ElectroApplication.java │ │ │ ├── Test.java │ │ │ ├── config │ │ │ ├── ApplicationConfig.java │ │ │ ├── GenericControllerDocumentationConfig.java │ │ │ ├── payment │ │ │ │ └── paypal │ │ │ │ │ ├── PayPalEndpoints.java │ │ │ │ │ ├── PayPalHttpClient.java │ │ │ │ │ └── PaypalConfig.java │ │ │ ├── security │ │ │ │ ├── AuthTokenFilter.java │ │ │ │ ├── JwtUtils.java │ │ │ │ ├── UserDetailsImpl.java │ │ │ │ ├── UserDetailsServiceImpl.java │ │ │ │ └── WebSecurityConfig.java │ │ │ └── websocket │ │ │ │ └── WebsocketConfig.java │ │ │ ├── constant │ │ │ ├── AppConstants.java │ │ │ ├── FieldName.java │ │ │ ├── ResourceName.java │ │ │ ├── SearchFields.java │ │ │ └── SecurityConstants.java │ │ │ ├── controller │ │ │ ├── FunctionalEndpointRegister.java │ │ │ ├── GenericController.java │ │ │ ├── GenericMappingRegister.java │ │ │ ├── HandlerFunctions.java │ │ │ ├── address │ │ │ │ └── ProvinceController.java │ │ │ ├── authentication │ │ │ │ └── AuthController.java │ │ │ ├── chat │ │ │ │ └── ChatController.java │ │ │ ├── client │ │ │ │ ├── ClientCartController.java │ │ │ │ ├── ClientCategoryController.java │ │ │ │ ├── ClientChatController.java │ │ │ │ ├── ClientFilterController.java │ │ │ │ ├── ClientNotificationController.java │ │ │ │ ├── ClientOrderController.java │ │ │ │ ├── ClientPaymentMethodController.java │ │ │ │ ├── ClientPreorderController.java │ │ │ │ ├── ClientProductController.java │ │ │ │ ├── ClientReviewController.java │ │ │ │ ├── ClientRewardController.java │ │ │ │ ├── ClientUserController.java │ │ │ │ └── ClientWishController.java │ │ │ ├── general │ │ │ │ └── ImageController.java │ │ │ ├── inventory │ │ │ │ ├── CountVariantController.java │ │ │ │ ├── DocketVariantController.java │ │ │ │ ├── InventoryController.java │ │ │ │ └── PurchaseOrderVariantController.java │ │ │ ├── order │ │ │ │ ├── OrderController.java │ │ │ │ └── OrderVariantController.java │ │ │ ├── promotion │ │ │ │ └── PromotionController.java │ │ │ ├── statistic │ │ │ │ └── StatisticController.java │ │ │ └── waybill │ │ │ │ └── WaybillController.java │ │ │ ├── dto │ │ │ ├── CollectionWrapper.java │ │ │ ├── ListResponse.java │ │ │ ├── address │ │ │ │ ├── AddressRequest.java │ │ │ │ ├── AddressResponse.java │ │ │ │ ├── DistrictRequest.java │ │ │ │ ├── DistrictResponse.java │ │ │ │ ├── ProvinceRequest.java │ │ │ │ ├── ProvinceResponse.java │ │ │ │ ├── WardRequest.java │ │ │ │ └── WardResponse.java │ │ │ ├── authentication │ │ │ │ ├── JwtResponse.java │ │ │ │ ├── LoginRequest.java │ │ │ │ ├── RefreshTokenRequest.java │ │ │ │ ├── RegistrationRequest.java │ │ │ │ ├── RegistrationResponse.java │ │ │ │ ├── ResetPasswordRequest.java │ │ │ │ ├── RoleRequest.java │ │ │ │ ├── RoleResponse.java │ │ │ │ ├── Role_UserRequest.java │ │ │ │ ├── UserRequest.java │ │ │ │ └── UserResponse.java │ │ │ ├── cashbook │ │ │ │ ├── ClientPaymentMethodResponse.java │ │ │ │ ├── PaymentMethodRequest.java │ │ │ │ └── PaymentMethodResponse.java │ │ │ ├── chat │ │ │ │ ├── ClientRoomExistenceResponse.java │ │ │ │ ├── MessageRequest.java │ │ │ │ ├── MessageResponse.java │ │ │ │ ├── RoomRequest.java │ │ │ │ └── RoomResponse.java │ │ │ ├── client │ │ │ │ ├── ClientBrandResponse.java │ │ │ │ ├── ClientCartRequest.java │ │ │ │ ├── ClientCartResponse.java │ │ │ │ ├── ClientCartVariantKeyRequest.java │ │ │ │ ├── ClientCartVariantRequest.java │ │ │ │ ├── ClientCartVariantResponse.java │ │ │ │ ├── ClientCategoryResponse.java │ │ │ │ ├── ClientConfirmedOrderResponse.java │ │ │ │ ├── ClientEmailSettingUserRequest.java │ │ │ │ ├── ClientFilterResponse.java │ │ │ │ ├── ClientListedProductResponse.java │ │ │ │ ├── ClientOrderDetailResponse.java │ │ │ │ ├── ClientOrderRequest.java │ │ │ │ ├── ClientOrderResponse.java │ │ │ │ ├── ClientOrderVariantResponse.java │ │ │ │ ├── ClientPasswordSettingUserRequest.java │ │ │ │ ├── ClientPersonalSettingUserRequest.java │ │ │ │ ├── ClientPhoneSettingUserRequest.java │ │ │ │ ├── ClientPreorderRequest.java │ │ │ │ ├── ClientPreorderResponse.java │ │ │ │ ├── ClientProductResponse.java │ │ │ │ ├── ClientPromotionResponse.java │ │ │ │ ├── ClientReviewRequest.java │ │ │ │ ├── ClientReviewResponse.java │ │ │ │ ├── ClientRewardLogResponse.java │ │ │ │ ├── ClientRewardResponse.java │ │ │ │ ├── ClientSimpleOrderRequest.java │ │ │ │ ├── ClientSimpleOrderResponse.java │ │ │ │ ├── ClientSimpleReviewResponse.java │ │ │ │ ├── ClientWaybillResponse.java │ │ │ │ ├── ClientWishRequest.java │ │ │ │ ├── ClientWishResponse.java │ │ │ │ └── UpdateQuantityType.java │ │ │ ├── customer │ │ │ │ ├── CustomerGroupRequest.java │ │ │ │ ├── CustomerGroupResponse.java │ │ │ │ ├── CustomerRequest.java │ │ │ │ ├── CustomerResourceRequest.java │ │ │ │ ├── CustomerResourceResponse.java │ │ │ │ ├── CustomerResponse.java │ │ │ │ ├── CustomerStatusRequest.java │ │ │ │ └── CustomerStatusResponse.java │ │ │ ├── employee │ │ │ │ ├── DepartmentRequest.java │ │ │ │ ├── DepartmentResponse.java │ │ │ │ ├── EmployeeRequest.java │ │ │ │ ├── EmployeeResponse.java │ │ │ │ ├── JobLevelRequest.java │ │ │ │ ├── JobLevelResponse.java │ │ │ │ ├── JobTitleRequest.java │ │ │ │ ├── JobTitleResponse.java │ │ │ │ ├── JobTypeRequest.java │ │ │ │ ├── JobTypeResponse.java │ │ │ │ ├── OfficeRequest.java │ │ │ │ └── OfficeResponse.java │ │ │ ├── general │ │ │ │ ├── EventInitiationResponse.java │ │ │ │ ├── ImageRequest.java │ │ │ │ ├── ImageResponse.java │ │ │ │ ├── NotificationRequest.java │ │ │ │ ├── NotificationResponse.java │ │ │ │ └── UploadedImageResponse.java │ │ │ ├── inventory │ │ │ │ ├── CountRequest.java │ │ │ │ ├── CountResponse.java │ │ │ │ ├── CountVariantKeyRequest.java │ │ │ │ ├── CountVariantRequest.java │ │ │ │ ├── CountVariantResponse.java │ │ │ │ ├── DestinationRequest.java │ │ │ │ ├── DestinationResponse.java │ │ │ │ ├── DocketReasonRequest.java │ │ │ │ ├── DocketReasonResponse.java │ │ │ │ ├── DocketRequest.java │ │ │ │ ├── DocketResponse.java │ │ │ │ ├── DocketVariantEliminatedResponse.java │ │ │ │ ├── DocketVariantExtendedResponse.java │ │ │ │ ├── DocketVariantKeyRequest.java │ │ │ │ ├── DocketVariantRequest.java │ │ │ │ ├── DocketVariantResponse.java │ │ │ │ ├── ProductInventoryLimitRequest.java │ │ │ │ ├── ProductInventoryLimitResponse.java │ │ │ │ ├── ProductInventoryResponse.java │ │ │ │ ├── PurchaseOrderRequest.java │ │ │ │ ├── PurchaseOrderResponse.java │ │ │ │ ├── PurchaseOrderVariantKeyRequest.java │ │ │ │ ├── PurchaseOrderVariantRequest.java │ │ │ │ ├── PurchaseOrderVariantResponse.java │ │ │ │ ├── StorageLocationRequest.java │ │ │ │ ├── StorageLocationResponse.java │ │ │ │ ├── TransferRequest.java │ │ │ │ ├── TransferResponse.java │ │ │ │ ├── VariantInventoryLimitRequest.java │ │ │ │ ├── VariantInventoryLimitResponse.java │ │ │ │ ├── VariantInventoryResponse.java │ │ │ │ ├── WarehouseRequest.java │ │ │ │ └── WarehouseResponse.java │ │ │ ├── json │ │ │ │ ├── ProductPropertyItem.java │ │ │ │ └── VariantPropertyItem.java │ │ │ ├── order │ │ │ │ ├── OrderCancellationReasonRequest.java │ │ │ │ ├── OrderCancellationReasonResponse.java │ │ │ │ ├── OrderRequest.java │ │ │ │ ├── OrderResourceRequest.java │ │ │ │ ├── OrderResourceResponse.java │ │ │ │ ├── OrderResponse.java │ │ │ │ ├── OrderVariantKeyRequest.java │ │ │ │ ├── OrderVariantRequest.java │ │ │ │ └── OrderVariantResponse.java │ │ │ ├── payment │ │ │ │ ├── AccessTokenResponse.java │ │ │ │ ├── ClientTokenResponse.java │ │ │ │ ├── OrderIntent.java │ │ │ │ ├── OrderStatus.java │ │ │ │ ├── PaymentLandingPage.java │ │ │ │ ├── PaypalCheckoutResponse.java │ │ │ │ ├── PaypalRequest.java │ │ │ │ └── PaypalResponse.java │ │ │ ├── product │ │ │ │ ├── BrandRequest.java │ │ │ │ ├── BrandResponse.java │ │ │ │ ├── CategoryRequest.java │ │ │ │ ├── CategoryResponse.java │ │ │ │ ├── GuaranteeRequest.java │ │ │ │ ├── GuaranteeResponse.java │ │ │ │ ├── ParentCategoryResponse.java │ │ │ │ ├── ProductRequest.java │ │ │ │ ├── ProductResponse.java │ │ │ │ ├── PropertyRequest.java │ │ │ │ ├── PropertyResponse.java │ │ │ │ ├── SpecificationRequest.java │ │ │ │ ├── SpecificationResponse.java │ │ │ │ ├── SupplierRequest.java │ │ │ │ ├── SupplierResponse.java │ │ │ │ ├── TagRequest.java │ │ │ │ ├── TagResponse.java │ │ │ │ ├── UnitRequest.java │ │ │ │ ├── UnitResponse.java │ │ │ │ ├── VariantRequest.java │ │ │ │ └── VariantResponse.java │ │ │ ├── promotion │ │ │ │ ├── PromotionCheckingResponse.java │ │ │ │ ├── PromotionRequest.java │ │ │ │ └── PromotionResponse.java │ │ │ ├── review │ │ │ │ ├── ReviewRequest.java │ │ │ │ └── ReviewResponse.java │ │ │ ├── reward │ │ │ │ ├── RewardStrategyRequest.java │ │ │ │ └── RewardStrategyResponse.java │ │ │ ├── statistic │ │ │ │ ├── StatisticResource.java │ │ │ │ └── StatisticResponse.java │ │ │ └── waybill │ │ │ │ ├── GhnCallbackOrderRequest.java │ │ │ │ ├── GhnCancelOrderRequest.java │ │ │ │ ├── GhnCancelOrderResponse.java │ │ │ │ ├── GhnCreateOrderRequest.java │ │ │ │ ├── GhnCreateOrderResponse.java │ │ │ │ ├── GhnUpdateOrderRequest.java │ │ │ │ ├── GhnUpdateOrderResponse.java │ │ │ │ ├── WaybillRequest.java │ │ │ │ └── WaybillResponse.java │ │ │ ├── entity │ │ │ ├── BaseEntity.java │ │ │ ├── address │ │ │ │ ├── Address.java │ │ │ │ ├── District.java │ │ │ │ ├── Province.java │ │ │ │ └── Ward.java │ │ │ ├── authentication │ │ │ │ ├── RefreshToken.java │ │ │ │ ├── Role.java │ │ │ │ ├── User.java │ │ │ │ ├── Verification.java │ │ │ │ └── VerificationType.java │ │ │ ├── cart │ │ │ │ ├── Cart.java │ │ │ │ ├── CartVariant.java │ │ │ │ └── CartVariantKey.java │ │ │ ├── cashbook │ │ │ │ ├── PaymentMethod.java │ │ │ │ └── PaymentMethodType.java │ │ │ ├── chat │ │ │ │ ├── Message.java │ │ │ │ └── Room.java │ │ │ ├── client │ │ │ │ ├── Preorder.java │ │ │ │ └── Wish.java │ │ │ ├── customer │ │ │ │ ├── Customer.java │ │ │ │ ├── CustomerGroup.java │ │ │ │ ├── CustomerResource.java │ │ │ │ └── CustomerStatus.java │ │ │ ├── employee │ │ │ │ ├── Department.java │ │ │ │ ├── Employee.java │ │ │ │ ├── JobLevel.java │ │ │ │ ├── JobTitle.java │ │ │ │ ├── JobType.java │ │ │ │ └── Office.java │ │ │ ├── general │ │ │ │ ├── Image.java │ │ │ │ ├── Notification.java │ │ │ │ └── NotificationType.java │ │ │ ├── inventory │ │ │ │ ├── Count.java │ │ │ │ ├── CountVariant.java │ │ │ │ ├── CountVariantKey.java │ │ │ │ ├── Destination.java │ │ │ │ ├── Docket.java │ │ │ │ ├── DocketReason.java │ │ │ │ ├── DocketVariant.java │ │ │ │ ├── DocketVariantKey.java │ │ │ │ ├── ProductInventoryLimit.java │ │ │ │ ├── PurchaseOrder.java │ │ │ │ ├── PurchaseOrderVariant.java │ │ │ │ ├── PurchaseOrderVariantKey.java │ │ │ │ ├── StorageLocation.java │ │ │ │ ├── Transfer.java │ │ │ │ ├── VariantInventoryLimit.java │ │ │ │ └── Warehouse.java │ │ │ ├── order │ │ │ │ ├── Order.java │ │ │ │ ├── OrderCancellationReason.java │ │ │ │ ├── OrderResource.java │ │ │ │ ├── OrderVariant.java │ │ │ │ └── OrderVariantKey.java │ │ │ ├── product │ │ │ │ ├── Brand.java │ │ │ │ ├── Category.java │ │ │ │ ├── Guarantee.java │ │ │ │ ├── Product.java │ │ │ │ ├── Property.java │ │ │ │ ├── Specification.java │ │ │ │ ├── Supplier.java │ │ │ │ ├── Tag.java │ │ │ │ ├── Unit.java │ │ │ │ └── Variant.java │ │ │ ├── promotion │ │ │ │ └── Promotion.java │ │ │ ├── review │ │ │ │ └── Review.java │ │ │ ├── reward │ │ │ │ ├── RewardLog.java │ │ │ │ ├── RewardStrategy.java │ │ │ │ └── RewardType.java │ │ │ └── waybill │ │ │ │ ├── RequiredNote.java │ │ │ │ ├── Waybill.java │ │ │ │ └── WaybillLog.java │ │ │ ├── exception │ │ │ ├── ApplicationExceptionHandler.java │ │ │ ├── ErrorMessage.java │ │ │ ├── ExpiredTokenException.java │ │ │ ├── FileStorageException.java │ │ │ ├── RefreshTokenException.java │ │ │ ├── ResourceNotFoundException.java │ │ │ ├── StorageFileNotFoundException.java │ │ │ └── VerificationException.java │ │ │ ├── mapper │ │ │ ├── GenericMapper.java │ │ │ ├── address │ │ │ │ ├── AddressMapper.java │ │ │ │ ├── DistrictMapper.java │ │ │ │ ├── ProvinceMapper.java │ │ │ │ └── WardMapper.java │ │ │ ├── authentication │ │ │ │ ├── RoleMapper.java │ │ │ │ └── UserMapper.java │ │ │ ├── cashbook │ │ │ │ └── PaymentMethodMapper.java │ │ │ ├── chat │ │ │ │ ├── MessageMapper.java │ │ │ │ └── RoomMapper.java │ │ │ ├── client │ │ │ │ ├── ClientCartMapper.java │ │ │ │ ├── ClientCategoryMapper.java │ │ │ │ ├── ClientOrderMapper.java │ │ │ │ ├── ClientPreorderMapper.java │ │ │ │ ├── ClientProductMapper.java │ │ │ │ ├── ClientReviewMapper.java │ │ │ │ ├── ClientRewardLogMapper.java │ │ │ │ └── ClientWishMapper.java │ │ │ ├── customer │ │ │ │ ├── CustomerGroupMapper.java │ │ │ │ ├── CustomerMapper.java │ │ │ │ ├── CustomerResourceMapper.java │ │ │ │ └── CustomerStatusMapper.java │ │ │ ├── employee │ │ │ │ ├── DepartmentMapper.java │ │ │ │ ├── EmployeeMapper.java │ │ │ │ ├── JobLevelMapper.java │ │ │ │ ├── JobTitleMapper.java │ │ │ │ ├── JobTypeMapper.java │ │ │ │ └── OfficeMapper.java │ │ │ ├── general │ │ │ │ ├── EventMapper.java │ │ │ │ ├── ImageMapper.java │ │ │ │ └── NotificationMapper.java │ │ │ ├── inventory │ │ │ │ ├── CountMapper.java │ │ │ │ ├── CountVariantMapper.java │ │ │ │ ├── DestinationMapper.java │ │ │ │ ├── DocketMapper.java │ │ │ │ ├── DocketReasonMapper.java │ │ │ │ ├── DocketVariantMapper.java │ │ │ │ ├── ProductInventoryLimitMapper.java │ │ │ │ ├── PurchaseOrderMapper.java │ │ │ │ ├── PurchaseOrderVariantMapper.java │ │ │ │ ├── StorageLocationMapper.java │ │ │ │ ├── TransferMapper.java │ │ │ │ ├── VariantInventoryLimitMapper.java │ │ │ │ └── WarehouseMapper.java │ │ │ ├── order │ │ │ │ ├── OrderCancellationReasonMapper.java │ │ │ │ ├── OrderMapper.java │ │ │ │ ├── OrderResourceMapper.java │ │ │ │ └── OrderVariantMapper.java │ │ │ ├── product │ │ │ │ ├── BrandMapper.java │ │ │ │ ├── CategoryMapper.java │ │ │ │ ├── GuaranteeMapper.java │ │ │ │ ├── ProductInventoryMapper.java │ │ │ │ ├── ProductMapper.java │ │ │ │ ├── PropertyMapper.java │ │ │ │ ├── SpecificationMapper.java │ │ │ │ ├── SupplierMapper.java │ │ │ │ ├── TagMapper.java │ │ │ │ ├── UnitMapper.java │ │ │ │ ├── VariantInventoryMapper.java │ │ │ │ └── VariantMapper.java │ │ │ ├── promotion │ │ │ │ └── PromotionMapper.java │ │ │ ├── review │ │ │ │ └── ReviewMapper.java │ │ │ ├── reward │ │ │ │ └── RewardStrategyMapper.java │ │ │ └── waybill │ │ │ │ └── WaybillMapper.java │ │ │ ├── projection │ │ │ └── inventory │ │ │ │ ├── ProductInventory.java │ │ │ │ ├── SimpleProductInventory.java │ │ │ │ └── VariantInventory.java │ │ │ ├── repository │ │ │ ├── ProjectionRepository.java │ │ │ ├── address │ │ │ │ ├── AddressRepository.java │ │ │ │ ├── DistrictRepository.java │ │ │ │ ├── ProvinceRepository.java │ │ │ │ └── WardRepository.java │ │ │ ├── authentication │ │ │ │ ├── RefreshTokenRepository.java │ │ │ │ ├── RoleRepository.java │ │ │ │ ├── UserProjectionRepository.java │ │ │ │ ├── UserRepository.java │ │ │ │ └── VerificationRepository.java │ │ │ ├── cart │ │ │ │ ├── CartRepository.java │ │ │ │ └── CartVariantRepository.java │ │ │ ├── cashbook │ │ │ │ └── PaymentMethodRepository.java │ │ │ ├── chat │ │ │ │ ├── MessageRepository.java │ │ │ │ └── RoomRepository.java │ │ │ ├── client │ │ │ │ ├── PreorderRepository.java │ │ │ │ └── WishRepository.java │ │ │ ├── customer │ │ │ │ ├── CustomerGroupRepository.java │ │ │ │ ├── CustomerRepository.java │ │ │ │ ├── CustomerResourceRepository.java │ │ │ │ └── CustomerStatusRepository.java │ │ │ ├── employee │ │ │ │ ├── DepartmentRepository.java │ │ │ │ ├── EmployeeRepository.java │ │ │ │ ├── JobLevelRepository.java │ │ │ │ ├── JobTitleRepository.java │ │ │ │ ├── JobTypeRepository.java │ │ │ │ └── OfficeRepository.java │ │ │ ├── general │ │ │ │ ├── EmitterRepository.java │ │ │ │ ├── ImageRepository.java │ │ │ │ ├── InMemoryEmitterRepository.java │ │ │ │ └── NotificationRepository.java │ │ │ ├── inventory │ │ │ │ ├── CountRepository.java │ │ │ │ ├── CountVariantRepository.java │ │ │ │ ├── DestinationRepository.java │ │ │ │ ├── DocketReasonRepository.java │ │ │ │ ├── DocketRepository.java │ │ │ │ ├── DocketVariantRepository.java │ │ │ │ ├── ProductInventoryLimitRepository.java │ │ │ │ ├── PurchaseOrderRepository.java │ │ │ │ ├── PurchaseOrderVariantRepository.java │ │ │ │ ├── StorageLocationRepository.java │ │ │ │ ├── TransferRepository.java │ │ │ │ ├── VariantInventoryLimitRepository.java │ │ │ │ └── WarehouseRepository.java │ │ │ ├── order │ │ │ │ ├── OrderCancellationReasonRepository.java │ │ │ │ ├── OrderProjectionRepository.java │ │ │ │ ├── OrderRepository.java │ │ │ │ ├── OrderResourceRepository.java │ │ │ │ └── OrderVariantRepository.java │ │ │ ├── product │ │ │ │ ├── BrandRepository.java │ │ │ │ ├── CategoryRepository.java │ │ │ │ ├── GuaranteeRepository.java │ │ │ │ ├── ProductRepository.java │ │ │ │ ├── PropertyRepository.java │ │ │ │ ├── SpecificationRepository.java │ │ │ │ ├── SupplierRepository.java │ │ │ │ ├── TagRepository.java │ │ │ │ ├── UnitRepository.java │ │ │ │ └── VariantRepository.java │ │ │ ├── promotion │ │ │ │ └── PromotionRepository.java │ │ │ ├── review │ │ │ │ ├── ReviewProjectionRepository.java │ │ │ │ └── ReviewRepository.java │ │ │ ├── reward │ │ │ │ ├── RewardLogRepository.java │ │ │ │ └── RewardStrategyRepository.java │ │ │ └── waybill │ │ │ │ ├── WaybillLogRepository.java │ │ │ │ ├── WaybillProjectionRepository.java │ │ │ │ └── WaybillRepository.java │ │ │ ├── service │ │ │ ├── CrudService.java │ │ │ ├── GenericService.java │ │ │ ├── address │ │ │ │ ├── ProvinceService.java │ │ │ │ └── ProvinceServiceImpl.java │ │ │ ├── auth │ │ │ │ ├── VerificationService.java │ │ │ │ └── VerificationServiceImpl.java │ │ │ ├── authetication │ │ │ │ ├── RefreshTokenService.java │ │ │ │ └── RefresherTokenServiceImpl.java │ │ │ ├── chat │ │ │ │ ├── MessageService.java │ │ │ │ └── MessageServiceImpl.java │ │ │ ├── email │ │ │ │ ├── EmailSenderService.java │ │ │ │ └── EmailSenderServiceImpl.java │ │ │ ├── general │ │ │ │ ├── EmitterService.java │ │ │ │ ├── ImageService.java │ │ │ │ ├── ImageServiceImpl.java │ │ │ │ ├── NotificationService.java │ │ │ │ └── SseNotificationService.java │ │ │ ├── inventory │ │ │ │ ├── CountVariantService.java │ │ │ │ ├── CountVariantServiceImpl.java │ │ │ │ ├── DocketService.java │ │ │ │ ├── DocketServiceImpl.java │ │ │ │ ├── DocketVariantService.java │ │ │ │ ├── DocketVariantServiceImpl.java │ │ │ │ ├── OrderVariantService.java │ │ │ │ ├── OrderVariantServiceImpl.java │ │ │ │ ├── PurchaseOrderVariantService.java │ │ │ │ └── PurchaseOrderVariantServiceImpl.java │ │ │ ├── order │ │ │ │ ├── OrderService.java │ │ │ │ └── OrderServiceImpl.java │ │ │ ├── promotion │ │ │ │ ├── PromotionService.java │ │ │ │ └── PromotionServiceImpl.java │ │ │ ├── review │ │ │ │ ├── ReviewService.java │ │ │ │ └── ReviewServiceImpl.java │ │ │ ├── statistic │ │ │ │ ├── StatisticService.java │ │ │ │ └── StatisticServiceImpl.java │ │ │ └── waybill │ │ │ │ ├── WaybillCallbackConstants.java │ │ │ │ ├── WaybillService.java │ │ │ │ └── WaybillServiceImpl.java │ │ │ └── utils │ │ │ ├── DefaultInstantDeserializer.java │ │ │ ├── InventoryUtils.java │ │ │ ├── JsonNodeConverter.java │ │ │ ├── MapperUtils.java │ │ │ ├── RewardUtils.java │ │ │ └── SearchUtils.java │ └── resources │ │ ├── address.sql │ │ ├── application-ci.properties │ │ ├── application-dev.properties │ │ ├── application.properties │ │ ├── data.sql │ │ ├── schema.sql │ │ └── templates │ │ ├── forget-password-email.ftlh │ │ └── verify-email.ftlh │ └── test │ └── java │ └── com │ └── electro │ ├── DistrictRepositoryTests.java │ ├── ElectroApplicationTests.java │ ├── ProductRepositoryTests.java │ └── UserRepositoryTests.java └── postman ├── ElectroAPI.v1.0.postman_collection.json └── ElectroAPI.v2.0.postman_collection.json /electro-client/.dockerignore: -------------------------------------------------------------------------------- 1 | .idea 2 | node_modules 3 | .git 4 | .gitignore 5 | *.iml 6 | *.md 7 | .DS_Store 8 | -------------------------------------------------------------------------------- /electro-client/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /electro-client/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /electro-client/.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /electro-client/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | -------------------------------------------------------------------------------- /electro-client/.idea/jpa-buddy.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /electro-client/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /electro-client/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /electro-client/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /electro-client/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.17-alpine 2 | 3 | COPY nginx.conf /etc/nginx/nginx.conf 4 | 5 | WORKDIR /usr/share/nginx/html 6 | 7 | ADD build /usr/share/nginx/html 8 | -------------------------------------------------------------------------------- /electro-client/electro-client.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /electro-client/nginx.conf: -------------------------------------------------------------------------------- 1 | # Reference: 2 | # (1) https://gkedge.gitbooks.io/react-router-in-the-real/content/nginx.html 3 | # (2) https://stackoverflow.com/q/43951720 4 | 5 | user nginx; 6 | worker_processes 1; 7 | 8 | error_log /var/log/nginx/error.log warn; 9 | pid /var/run/nginx.pid; 10 | 11 | events { 12 | worker_connections 1024; 13 | } 14 | 15 | http { 16 | include /etc/nginx/mime.types; 17 | default_type application/octet-stream; 18 | 19 | server { 20 | listen 80 default_server; 21 | server_name electro-client; 22 | 23 | root /usr/share/nginx/html; 24 | index index.html; 25 | 26 | location / { 27 | try_files $uri $uri/ /index.html; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /electro-client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daphdev/electro/4b4f2a91294c56ed94ea49dd4cf5cadde33b113c/electro-client/public/favicon.ico -------------------------------------------------------------------------------- /electro-client/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daphdev/electro/4b4f2a91294c56ed94ea49dd4cf5cadde33b113c/electro-client/public/logo192.png -------------------------------------------------------------------------------- /electro-client/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daphdev/electro/4b4f2a91294c56ed94ea49dd4cf5cadde33b113c/electro-client/public/logo512.png -------------------------------------------------------------------------------- /electro-client/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /electro-client/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /electro-client/src/App.test.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render, screen } from '@testing-library/react'; 3 | import App from './App'; 4 | 5 | test('renders learn react link', () => { 6 | render(); 7 | const linkElement = screen.getByText(/hello world/i); 8 | expect(linkElement).toBeInTheDocument(); 9 | }); 10 | -------------------------------------------------------------------------------- /electro-client/src/components/AdminError/AdminError.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Stack, Text, Title } from '@mantine/core'; 3 | 4 | function AdminError() { 5 | return ( 6 | 7 | ({ 10 | fontSize: 120, 11 | color: theme.colorScheme === 'dark' ? theme.colors.dark[4] : theme.colors.gray[2], 12 | })} 13 | > 14 | Oops... 15 | 16 | Đã có lỗi xảy ra 17 | 18 | ); 19 | } 20 | 21 | export default AdminError; 22 | -------------------------------------------------------------------------------- /electro-client/src/components/FilterPanel/FilterPanel.styles.ts: -------------------------------------------------------------------------------- 1 | import { createStyles } from '@mantine/core'; 2 | 3 | const useFilterPanelStyles = createStyles( 4 | (theme) => ({ 5 | titleFilterPanel: { 6 | backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[0], 7 | textAlign: 'center', 8 | padding: theme.spacing.xs, 9 | borderRadius: theme.radius.md, 10 | }, 11 | }) 12 | ); 13 | 14 | export default useFilterPanelStyles; 15 | -------------------------------------------------------------------------------- /electro-client/src/components/FilterPanelHeader/FilterPanelHeader.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Group } from '@mantine/core'; 3 | 4 | interface FilterPanelHeaderProps { 5 | children: React.ReactNode; 6 | } 7 | 8 | function FilterPanelHeader({ 9 | children, 10 | }: FilterPanelHeaderProps) { 11 | 12 | return ( 13 | 14 | {children} 15 | 16 | ); 17 | } 18 | 19 | export default FilterPanelHeader; 20 | -------------------------------------------------------------------------------- /electro-client/src/components/FilterPanelMain/FilterPanelMain.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Grid } from '@mantine/core'; 3 | 4 | interface FilterPanelMainProps { 5 | children: React.ReactNode; 6 | } 7 | 8 | function FilterPanelMain({ 9 | children, 10 | }: FilterPanelMainProps) { 11 | return ( 12 | 13 | {children} 14 | 15 | ); 16 | } 17 | 18 | export default FilterPanelMain; 19 | -------------------------------------------------------------------------------- /electro-client/src/components/ManageHeader/ManageHeader.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Group } from '@mantine/core'; 3 | 4 | interface ManageHeaderProps { 5 | children: React.ReactNode; 6 | } 7 | 8 | function ManageHeader({ 9 | children, 10 | }: ManageHeaderProps) { 11 | 12 | return ( 13 | 14 | {children} 15 | 16 | ); 17 | } 18 | 19 | export default ManageHeader; 20 | -------------------------------------------------------------------------------- /electro-client/src/components/ManageTable/ManageTable.styles.ts: -------------------------------------------------------------------------------- 1 | import { createStyles } from '@mantine/core'; 2 | 3 | const useManageTableStyles = createStyles( 4 | (theme) => ({ 5 | rowSelected: { 6 | backgroundColor: 7 | theme.colorScheme === 'dark' 8 | ? theme.fn.rgba(theme.colors[theme.primaryColor][7], 0.2) + '!important' 9 | : theme.colors[theme.primaryColor][0] + '!important', 10 | }, 11 | }) 12 | ); 13 | 14 | export default useManageTableStyles; 15 | -------------------------------------------------------------------------------- /electro-client/src/components/ReviewStarGroup/ReviewStarGroup.tsx: -------------------------------------------------------------------------------- 1 | import { Group, useMantineTheme } from '@mantine/core'; 2 | import { Star } from 'tabler-icons-react'; 3 | import React from 'react'; 4 | 5 | function ReviewStarGroup({ ratingScore }: { ratingScore: number }) { 6 | const theme = useMantineTheme(); 7 | 8 | return ( 9 | 10 | {Array(5).fill(0).map((_, index) => ( 11 | 17 | ))} 18 | 19 | ); 20 | } 21 | 22 | export default ReviewStarGroup; 23 | -------------------------------------------------------------------------------- /electro-client/src/components/ScrollToTop/ScrollToTop.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react'; 2 | import { useLocation } from 'react-router-dom'; 3 | 4 | // Reference: https://stackoverflow.com/q/36904185 5 | function ScrollToTop() { 6 | const { pathname } = useLocation(); 7 | 8 | useEffect(() => { 9 | window.scroll({ 10 | top: 0, 11 | left: 0, 12 | behavior: 'smooth', 13 | }); 14 | }, [pathname]); 15 | 16 | return null; 17 | } 18 | 19 | export default ScrollToTop; 20 | -------------------------------------------------------------------------------- /electro-client/src/hooks/use-create-api.ts: -------------------------------------------------------------------------------- 1 | import { useMutation } from 'react-query'; 2 | import FetchUtils, { ErrorMessage } from 'utils/FetchUtils'; 3 | import NotifyUtils from 'utils/NotifyUtils'; 4 | 5 | function useCreateApi(resourceUrl: string) { 6 | return useMutation( 7 | (requestBody) => FetchUtils.create(resourceUrl, requestBody), 8 | { 9 | onSuccess: () => NotifyUtils.simpleSuccess('Tạo thành công'), 10 | onError: () => NotifyUtils.simpleFailed('Tạo không thành công'), 11 | } 12 | ); 13 | } 14 | 15 | export default useCreateApi; 16 | -------------------------------------------------------------------------------- /electro-client/src/hooks/use-init-filter-panel-state.ts: -------------------------------------------------------------------------------- 1 | import useFilterPanelStore from 'stores/use-filter-panel-store'; 2 | import { useEffect } from 'react'; 3 | import { EntityPropertySchema } from 'types'; 4 | 5 | function useInitFilterPanelState(properties: EntityPropertySchema) { 6 | const { initFilterPanelState } = useFilterPanelStore(); 7 | 8 | useEffect(() => { 9 | initFilterPanelState(properties); 10 | }, [initFilterPanelState, properties]); 11 | } 12 | 13 | export default useInitFilterPanelState; 14 | -------------------------------------------------------------------------------- /electro-client/src/hooks/use-reset-manage-page-state.ts: -------------------------------------------------------------------------------- 1 | import useAppStore from 'stores/use-app-store'; 2 | import { useEffect } from 'react'; 3 | 4 | function useResetManagePageState() { 5 | const { resetManagePageState } = useAppStore(); 6 | 7 | useEffect(() => { 8 | resetManagePageState(); 9 | }, [resetManagePageState]); 10 | } 11 | 12 | export default useResetManagePageState; 13 | -------------------------------------------------------------------------------- /electro-client/src/hooks/use-title.ts: -------------------------------------------------------------------------------- 1 | import Titles from 'constants/Titles'; 2 | import { matchRoutes, useLocation } from 'react-router-dom'; 3 | import { useDocumentTitle } from '@mantine/hooks'; 4 | 5 | const routes = Object.keys(Titles).map(title => ({ path: title })); 6 | 7 | function useTitle(explicitTitle?: string) { 8 | const location = useLocation(); 9 | const match = matchRoutes(routes, location); 10 | const path = match ? match[0].route.path : ''; 11 | 12 | useDocumentTitle(explicitTitle ? explicitTitle + ' – Electro' : Titles[path]); 13 | } 14 | 15 | export default useTitle; 16 | -------------------------------------------------------------------------------- /electro-client/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /electro-client/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | import { BrowserRouter } from 'react-router-dom'; 7 | 8 | const root = ( 9 | 10 | 11 | 12 | 13 | 14 | ); 15 | 16 | ReactDOM.render(root, document.getElementById('root')); 17 | 18 | // If you want to start measuring performance in your app, pass a function 19 | // to log results (for example: reportWebVitals(console.log)) 20 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 21 | reportWebVitals(); 22 | -------------------------------------------------------------------------------- /electro-client/src/models/Authentication.ts: -------------------------------------------------------------------------------- 1 | export interface LoginRequest { 2 | username: string; 3 | password: string; 4 | } 5 | 6 | export interface JwtResponse { 7 | message: string; 8 | token: string; 9 | createAt: string; 10 | } 11 | -------------------------------------------------------------------------------- /electro-client/src/models/BaseResponse.ts: -------------------------------------------------------------------------------- 1 | interface BaseResponse { 2 | id: number; 3 | createdAt: string; 4 | updatedAt: string; 5 | } 6 | 7 | export default BaseResponse; 8 | -------------------------------------------------------------------------------- /electro-client/src/models/Brand.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface BrandResponse extends BaseResponse { 4 | name: string; 5 | code: string; 6 | description: string | null; 7 | status: number; 8 | } 9 | 10 | export interface BrandRequest { 11 | name: string; 12 | code: string; 13 | description: string | null; 14 | status: number; 15 | } 16 | -------------------------------------------------------------------------------- /electro-client/src/models/Count.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | import { WarehouseResponse } from 'models/Warehouse'; 3 | import { CountVariantRequest, CountVariantResponse } from 'models/CountVariant'; 4 | 5 | export interface CountResponse extends BaseResponse { 6 | code: string; 7 | warehouse: WarehouseResponse; 8 | countVariants: CountVariantResponse[]; 9 | note: string | null; 10 | status: number; 11 | } 12 | 13 | export interface CountRequest { 14 | code: string; 15 | warehouseId: number; 16 | countVariants: CountVariantRequest[]; 17 | note: string | null; 18 | status: number; 19 | } 20 | -------------------------------------------------------------------------------- /electro-client/src/models/CustomerGroup.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface CustomerGroupResponse extends BaseResponse { 4 | code: string; 5 | name: string; 6 | description: string; 7 | color: string; 8 | status: number; 9 | } 10 | 11 | export interface CustomerGroupRequest { 12 | code: string; 13 | name: string; 14 | description: string; 15 | color: string; 16 | status: number; 17 | } 18 | -------------------------------------------------------------------------------- /electro-client/src/models/CustomerResource.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface CustomerResourceResponse extends BaseResponse { 4 | code: string; 5 | name: string; 6 | description: string; 7 | color: string; 8 | status: number; 9 | } 10 | 11 | export interface CustomerResourceRequest { 12 | code: string; 13 | name: string; 14 | description: string; 15 | color: string; 16 | status: number; 17 | } 18 | -------------------------------------------------------------------------------- /electro-client/src/models/CustomerStatus.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface CustomerStatusResponse extends BaseResponse { 4 | code: string; 5 | name: string; 6 | description: string; 7 | color: string; 8 | status: number; 9 | } 10 | 11 | export interface CustomerStatusRequest { 12 | code: string; 13 | name: string; 14 | description: string; 15 | color: string; 16 | status: number; 17 | } 18 | -------------------------------------------------------------------------------- /electro-client/src/models/Department.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface DepartmentResponse extends BaseResponse { 4 | name: string; 5 | status: number; 6 | } 7 | 8 | export interface DepartmentRequest { 9 | name: string; 10 | status: number; 11 | } 12 | -------------------------------------------------------------------------------- /electro-client/src/models/Destination.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | import { AddressRequest, AddressResponse } from 'models/Address'; 3 | 4 | export interface DestinationResponse extends BaseResponse { 5 | contactFullname: string | null; 6 | contactEmail: string | null; 7 | contactPhone: string | null; 8 | address: AddressResponse; 9 | status: number; 10 | } 11 | 12 | export interface DestinationRequest { 13 | contactFullname: string | null; 14 | contactEmail: string | null; 15 | contactPhone: string | null; 16 | address: AddressRequest; 17 | status: number; 18 | } 19 | -------------------------------------------------------------------------------- /electro-client/src/models/District.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | import { ProvinceResponse } from 'models/Province'; 3 | 4 | export interface DistrictResponse extends BaseResponse { 5 | name: string; 6 | code: string; 7 | province: ProvinceResponse; 8 | } 9 | 10 | export interface DistrictRequest { 11 | name: string; 12 | code: string; 13 | provinceId: number; 14 | } 15 | -------------------------------------------------------------------------------- /electro-client/src/models/DocketReason.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface DocketReasonResponse extends BaseResponse { 4 | name: string; 5 | status: number; 6 | } 7 | 8 | export interface DocketReasonRequest { 9 | name: string; 10 | status: number; 11 | } 12 | -------------------------------------------------------------------------------- /electro-client/src/models/Guarantee.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface GuaranteeResponse extends BaseResponse { 4 | name: string; 5 | description: string | null; 6 | status: number; 7 | } 8 | 9 | export interface GuaranteeRequest { 10 | name: string; 11 | description: string | null; 12 | status: number; 13 | } 14 | -------------------------------------------------------------------------------- /electro-client/src/models/Image.ts: -------------------------------------------------------------------------------- 1 | export interface UploadedImageResponse { 2 | name: string; 3 | path: string; 4 | contentType: string; 5 | size: number; 6 | } 7 | 8 | /** 9 | * Cân nhắc đổi kiểu của id sang optional number 10 | */ 11 | export interface ImageRequest { 12 | id: number | null; 13 | name: string; 14 | path: string; 15 | contentType: string; 16 | size: number; 17 | group: string; 18 | isThumbnail: boolean; 19 | isEliminated: boolean; 20 | } 21 | 22 | export interface ImageResponse { 23 | id: number; 24 | name: string; 25 | path: string; 26 | contentType: string; 27 | size: number; 28 | group: string; 29 | isThumbnail: boolean; 30 | isEliminated: boolean; 31 | } 32 | -------------------------------------------------------------------------------- /electro-client/src/models/JobLevel.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface JobLevelResponse extends BaseResponse { 4 | name: string; 5 | status: number; 6 | } 7 | 8 | export interface JobLevelRequest { 9 | name: string; 10 | status: number; 11 | } 12 | -------------------------------------------------------------------------------- /electro-client/src/models/JobTitle.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface JobTitleResponse extends BaseResponse { 4 | name: string; 5 | status: number; 6 | } 7 | 8 | export interface JobTitleRequest { 9 | name: string; 10 | status: number; 11 | } 12 | -------------------------------------------------------------------------------- /electro-client/src/models/JobType.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface JobTypeResponse extends BaseResponse { 4 | name: string; 5 | status: number; 6 | } 7 | 8 | export interface JobTypeRequest { 9 | name: string; 10 | status: number; 11 | } 12 | -------------------------------------------------------------------------------- /electro-client/src/models/Message.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface MessageResponse extends BaseResponse { 4 | content: string; 5 | status: number; 6 | user: UserResponse; 7 | } 8 | 9 | interface UserResponse { 10 | id: number; 11 | username: string; 12 | fullname: string; 13 | email: string; 14 | } 15 | 16 | export interface MessageRequest { 17 | content: string; 18 | status: number; 19 | userId: number; 20 | roomId: number; 21 | } 22 | -------------------------------------------------------------------------------- /electro-client/src/models/Office.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | import { AddressRequest, AddressResponse } from 'models/Address'; 3 | 4 | export interface OfficeResponse extends BaseResponse { 5 | name: string; 6 | address: AddressResponse; 7 | status: number; 8 | } 9 | 10 | export interface OfficeRequest { 11 | name: string; 12 | address: AddressRequest; 13 | status: number; 14 | } 15 | -------------------------------------------------------------------------------- /electro-client/src/models/OrderCancellationReason.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface OrderCancellationReasonResponse extends BaseResponse { 4 | name: string; 5 | note: string | null; 6 | status: number; 7 | } 8 | 9 | export interface OrderCancellationReasonRequest { 10 | name: string; 11 | note: string | null; 12 | status: number; 13 | } 14 | -------------------------------------------------------------------------------- /electro-client/src/models/OrderResource.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | import { CustomerResourceResponse } from 'models/CustomerResource'; 3 | 4 | export interface OrderResourceResponse extends BaseResponse { 5 | code: string; 6 | name: string; 7 | color: string; 8 | customerResource: CustomerResourceResponse | null; 9 | status: number; 10 | } 11 | 12 | export interface OrderResourceRequest { 13 | code: string; 14 | name: string; 15 | color: string; 16 | customerResourceId: number | null; 17 | status: number; 18 | } 19 | -------------------------------------------------------------------------------- /electro-client/src/models/PaymentMethod.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface PaymentMethodResponse extends BaseResponse { 4 | name: string; 5 | code: PaymentMethodType; 6 | status: number; 7 | } 8 | 9 | export interface PaymentMethodRequest { 10 | status: number; 11 | } 12 | 13 | export enum PaymentMethodType { 14 | CASH = 'CASH', 15 | PAYPAL = 'PAYPAL' 16 | } 17 | -------------------------------------------------------------------------------- /electro-client/src/models/ProductInventory.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | import { BrandResponse } from 'models/Brand'; 3 | import { SupplierResponse } from 'models/Supplier'; 4 | import { DocketVariantExtendedResponse } from 'models/DocketVariantExtended'; 5 | 6 | export interface ProductInventoryResponse { 7 | product: ProductResponse; 8 | transactions: DocketVariantExtendedResponse[]; 9 | inventory: number; 10 | waitingForDelivery: number; 11 | canBeSold: number; 12 | areComing: number; 13 | } 14 | 15 | interface ProductResponse extends BaseResponse { 16 | name: string; 17 | code: string; 18 | slug: string; 19 | brand: BrandResponse | null; 20 | supplier: SupplierResponse | null; 21 | } 22 | -------------------------------------------------------------------------------- /electro-client/src/models/Promotion.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | import { ProductResponse } from 'models/Product'; 3 | 4 | export interface PromotionResponse extends BaseResponse { 5 | name: string; 6 | startDate: string; 7 | endDate: string; 8 | percent: number; 9 | status: number; 10 | products: ProductResponse[]; 11 | } 12 | 13 | export interface PromotionRequest { 14 | name: string; 15 | startDate: string; 16 | endDate: string; 17 | percent: number; 18 | status: number; 19 | productIds: number[]; 20 | categoryIds: number[]; 21 | } 22 | 23 | export interface PromotionCheckingResponse { 24 | promotionable: boolean; 25 | } 26 | -------------------------------------------------------------------------------- /electro-client/src/models/Property.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface PropertyResponse extends BaseResponse { 4 | name: string; 5 | code: string; 6 | description: string | null; 7 | status: number; 8 | } 9 | 10 | export interface PropertyRequest { 11 | name: string; 12 | code: string; 13 | description: string | null; 14 | status: number; 15 | } 16 | -------------------------------------------------------------------------------- /electro-client/src/models/Province.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface ProvinceResponse extends BaseResponse { 4 | name: string; 5 | code: string; 6 | } 7 | 8 | export interface ProvinceRequest { 9 | name: string; 10 | code: string; 11 | } 12 | -------------------------------------------------------------------------------- /electro-client/src/models/RewardStrategy.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export enum RewardType { 4 | SUCCESS_ORDER = 'SUCCESS_ORDER', 5 | ADD_REVIEW = 'ADD_REVIEW' 6 | } 7 | 8 | export interface RewardStrategyResponse extends BaseResponse { 9 | name: string; 10 | code: RewardType; 11 | formula: string; 12 | status: number; 13 | } 14 | 15 | export interface RewardStrategyRequest { 16 | formula: string | null; 17 | status: number | null; 18 | } 19 | -------------------------------------------------------------------------------- /electro-client/src/models/Role.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface RoleResponse extends BaseResponse { 4 | code: string; 5 | name: string; 6 | status: number; 7 | } 8 | 9 | export interface RoleRequest { 10 | code: string; 11 | name: string; 12 | status: number; 13 | } 14 | -------------------------------------------------------------------------------- /electro-client/src/models/Room.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | import { MessageResponse } from 'models/Message'; 3 | 4 | export interface RoomResponse extends BaseResponse { 5 | name: string; 6 | user: UserResponse; 7 | lastMessage: MessageResponse; 8 | } 9 | 10 | interface UserResponse { 11 | id: number; 12 | username: string; 13 | fullname: string; 14 | email: string; 15 | } 16 | 17 | export interface RoomRequest { 18 | name: string; 19 | userId: number; 20 | } 21 | -------------------------------------------------------------------------------- /electro-client/src/models/Specification.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface SpecificationResponse extends BaseResponse { 4 | name: string; 5 | code: string; 6 | description: string | null; 7 | status: number; 8 | } 9 | 10 | export interface SpecificationRequest { 11 | name: string; 12 | code: string; 13 | description: string | null; 14 | status: number; 15 | } 16 | -------------------------------------------------------------------------------- /electro-client/src/models/Statistic.ts: -------------------------------------------------------------------------------- 1 | export interface StatisticResource { 2 | date: string; 3 | total: number; 4 | } 5 | 6 | export interface StatisticResponse { 7 | totalCustomer: number; 8 | totalProduct: number; 9 | totalOrder: number; 10 | totalWaybill: number; 11 | totalReview: number; 12 | totalActivePromotion: number; 13 | totalSupplier: number; 14 | totalBrand: number; 15 | statisticRegistration: StatisticResource[]; 16 | statisticOrder: StatisticResource[]; 17 | statisticReview: StatisticResource[]; 18 | statisticWaybill: StatisticResource[]; 19 | } 20 | -------------------------------------------------------------------------------- /electro-client/src/models/Tag.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface TagResponse extends BaseResponse { 4 | name: string; 5 | slug: string; 6 | status: number; 7 | } 8 | 9 | export interface TagRequest { 10 | name: string; 11 | slug: string; 12 | status: number; 13 | } 14 | -------------------------------------------------------------------------------- /electro-client/src/models/Transfer.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | import { DocketRequest, DocketResponse } from 'models/Docket'; 3 | 4 | export interface TransferResponse extends BaseResponse { 5 | code: string; 6 | exportDocket: DocketResponse; 7 | importDocket: DocketResponse; 8 | note: string | null; 9 | } 10 | 11 | export interface TransferRequest { 12 | code: string; 13 | exportDocket: DocketRequest; 14 | importDocket: DocketRequest; 15 | note: string | null; 16 | } 17 | -------------------------------------------------------------------------------- /electro-client/src/models/Unit.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | 3 | export interface UnitResponse extends BaseResponse { 4 | name: string; 5 | status: number; 6 | } 7 | 8 | export interface UnitRequest { 9 | name: string; 10 | status: number; 11 | } 12 | -------------------------------------------------------------------------------- /electro-client/src/models/Ward.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | import { DistrictResponse } from 'models/District'; 3 | 4 | export interface WardResponse extends BaseResponse { 5 | name: string; 6 | code: string; 7 | district: DistrictResponse; 8 | } 9 | 10 | export interface WardRequest { 11 | name: string; 12 | code: string; 13 | districtId: number; 14 | } 15 | -------------------------------------------------------------------------------- /electro-client/src/models/Warehouse.ts: -------------------------------------------------------------------------------- 1 | import BaseResponse from 'models/BaseResponse'; 2 | import { AddressRequest, AddressResponse } from 'models/Address'; 3 | 4 | export interface WarehouseResponse extends BaseResponse { 5 | code: string; 6 | name: string; 7 | address: AddressResponse | null; 8 | status: number; 9 | } 10 | 11 | export interface WarehouseRequest { 12 | code: string; 13 | name: string; 14 | address: AddressRequest | null; 15 | status: number; 16 | } 17 | -------------------------------------------------------------------------------- /electro-client/src/pages/address/index.ts: -------------------------------------------------------------------------------- 1 | import AddressManage from 'pages/address/AddressManage'; 2 | import AddressCreate from 'pages/address/AddressCreate'; 3 | import AddressUpdate from 'pages/address/AddressUpdate'; 4 | 5 | export { AddressManage as default, AddressCreate, AddressUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/admin-account/index.ts: -------------------------------------------------------------------------------- 1 | import AdminAccount from 'pages/admin-account/AdminAccount'; 2 | 3 | export { AdminAccount as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/admin-notification/AdminNotification.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Center, Stack, Text, useMantineTheme } from '@mantine/core'; 3 | import { Bell } from 'tabler-icons-react'; 4 | 5 | function AdminNotification() { 6 | const theme = useMantineTheme(); 7 | 8 | return ( 9 |
10 | 11 | 12 | Chức năng Thông báo của Admin hiện chưa được triển khai 13 | 14 |
15 | ); 16 | } 17 | 18 | export default AdminNotification; 19 | -------------------------------------------------------------------------------- /electro-client/src/pages/admin-notification/index.ts: -------------------------------------------------------------------------------- 1 | import AdminNotification from 'pages/admin-notification/AdminNotification'; 2 | 3 | export { AdminNotification as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/admin-signin/index.ts: -------------------------------------------------------------------------------- 1 | import AdminSignin from 'pages/admin-signin/AdminSignin'; 2 | 3 | export { AdminSignin as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/brand/index.ts: -------------------------------------------------------------------------------- 1 | import BrandManage from 'pages/brand/BrandManage'; 2 | import BrandCreate from 'pages/brand/BrandCreate'; 3 | import BrandUpdate from 'pages/brand/BrandUpdate'; 4 | 5 | export { BrandManage as default, BrandCreate, BrandUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/category/index.ts: -------------------------------------------------------------------------------- 1 | import CategoryManage from 'pages/category/CategoryManage'; 2 | import CategoryCreate from 'pages/category/CategoryCreate'; 3 | import CategoryUpdate from 'pages/category/CategoryUpdate'; 4 | 5 | export { CategoryManage as default, CategoryCreate, CategoryUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/chat/index.ts: -------------------------------------------------------------------------------- 1 | import ChatDashboard from 'pages/chat/ChatDashboard'; 2 | 3 | export { ChatDashboard as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-all-categories/index.ts: -------------------------------------------------------------------------------- 1 | import ClientAllCategories from 'pages/client-all-categories/ClientAllCategories'; 2 | 3 | export { ClientAllCategories as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-cart/index.ts: -------------------------------------------------------------------------------- 1 | import ClientCart from 'pages/client-cart/ClientCart'; 2 | 3 | export { ClientCart as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-category/ClientCategorySkeleton.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Container, Skeleton, Stack } from '@mantine/core'; 3 | 4 | function ClientCategorySkeleton() { 5 | return ( 6 |
7 | 8 | 9 | {Array(5).fill(0).map((_, index) => ( 10 | 11 | ))} 12 | 13 | 14 |
15 | ); 16 | } 17 | 18 | export default ClientCategorySkeleton; 19 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-category/index.ts: -------------------------------------------------------------------------------- 1 | import ClientCategory from 'pages/client-category/ClientCategory'; 2 | 3 | export { ClientCategory as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-chat/index.ts: -------------------------------------------------------------------------------- 1 | import ClientChat from 'pages/client-chat/ClientChat'; 2 | 3 | export { ClientChat as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-forgot-password/index.ts: -------------------------------------------------------------------------------- 1 | import ClientForgotPassword from 'pages/client-forgot-password/ClientForgotPassword'; 2 | import ClientChangePassword from 'pages/client-forgot-password/ClientChangePassword'; 3 | 4 | export { ClientForgotPassword as default, ClientChangePassword }; 5 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-home/index.ts: -------------------------------------------------------------------------------- 1 | import ClientHome from 'pages/client-home/ClientHome'; 2 | 3 | export { ClientHome as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-notification/index.ts: -------------------------------------------------------------------------------- 1 | import ClientNotification from 'pages/client-notification/ClientNotification'; 2 | 3 | export { ClientNotification as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-order-detail/index.ts: -------------------------------------------------------------------------------- 1 | import ClientOrderDetail from 'pages/client-order-detail/ClientOrderDetail'; 2 | 3 | export { ClientOrderDetail as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-order/index.ts: -------------------------------------------------------------------------------- 1 | import ClientOrder from 'pages/client-order/ClientOrder'; 2 | 3 | export { ClientOrder as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-payment-cancel/index.ts: -------------------------------------------------------------------------------- 1 | import ClientPaymentCancel from 'pages/client-payment-cancel/ClientPaymentCancel'; 2 | 3 | export { ClientPaymentCancel as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-payment-success/index.ts: -------------------------------------------------------------------------------- 1 | import ClientPaymentSuccess from 'pages/client-payment-success/ClientPaymentSuccess'; 2 | 3 | export { ClientPaymentSuccess as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-preorder/index.ts: -------------------------------------------------------------------------------- 1 | import ClientPreorder from 'pages/client-preorder/ClientPreorder'; 2 | 3 | export { ClientPreorder as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-product/ClientProductDescription.tsx: -------------------------------------------------------------------------------- 1 | import { Group, Stack, Text, Title } from '@mantine/core'; 2 | import { Receipt } from 'tabler-icons-react'; 3 | import React from 'react'; 4 | import { ClientProductResponse } from 'types'; 5 | 6 | interface ClientProductDescriptionProps { 7 | product: ClientProductResponse; 8 | } 9 | 10 | function ClientProductDescription({ product }: ClientProductDescriptionProps) { 11 | return ( 12 | 13 | 14 | 15 | Mô tả sản phẩm 16 | 17 | {product.productDescription} 18 | 19 | ); 20 | } 21 | 22 | export default ClientProductDescription; 23 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-product/index.ts: -------------------------------------------------------------------------------- 1 | import ClientProduct from 'pages/client-product/ClientProduct'; 2 | 3 | export { ClientProduct as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-review/index.ts: -------------------------------------------------------------------------------- 1 | import ClientReview from 'pages/client-review/ClientReview'; 2 | 3 | export { ClientReview as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-reward/index.ts: -------------------------------------------------------------------------------- 1 | import ClientReward from 'pages/client-reward/ClientReward'; 2 | 3 | export { ClientReward as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-search/index.ts: -------------------------------------------------------------------------------- 1 | import ClientSearch from 'pages/client-search/ClientSearch'; 2 | 3 | export { ClientSearch as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-setting-email/index.ts: -------------------------------------------------------------------------------- 1 | import ClientSettingEmail from 'pages/client-setting-email/ClientSettingEmail'; 2 | 3 | export { ClientSettingEmail as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-setting-password/index.ts: -------------------------------------------------------------------------------- 1 | import ClientSettingPassword from 'pages/client-setting-password/ClientSettingPassword'; 2 | 3 | export { ClientSettingPassword as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-setting-personal/index.ts: -------------------------------------------------------------------------------- 1 | import ClientSettingPersonal from 'pages/client-setting-personal/ClientSettingPersonal'; 2 | 3 | export { ClientSettingPersonal as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-setting-phone/index.ts: -------------------------------------------------------------------------------- 1 | import ClientSettingPhone from 'pages/client-setting-phone/ClientSettingPhone'; 2 | 3 | export { ClientSettingPhone as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-setting/index.ts: -------------------------------------------------------------------------------- 1 | import ClientSetting from 'pages/client-setting/ClientSetting'; 2 | 3 | export { ClientSetting as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-signin/index.ts: -------------------------------------------------------------------------------- 1 | import ClientSignin from 'pages/client-signin/ClientSignin'; 2 | 3 | export { ClientSignin as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-signup/index.ts: -------------------------------------------------------------------------------- 1 | import ClientSignup from 'pages/client-signup/ClientSignup'; 2 | 3 | export { ClientSignup as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-user/index.ts: -------------------------------------------------------------------------------- 1 | import ClientUser from 'pages/client-user/ClientUser'; 2 | 3 | export { ClientUser as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/client-wishlist/index.ts: -------------------------------------------------------------------------------- 1 | import ClientWishlist from 'pages/client-wishlist/ClientWishlist'; 2 | 3 | export { ClientWishlist as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/count/index.ts: -------------------------------------------------------------------------------- 1 | import CountManage from 'pages/count/CountManage'; 2 | import CountCreate from 'pages/count/CountCreate'; 3 | import CountUpdate from 'pages/count/CountUpdate'; 4 | 5 | export { CountManage as default, CountCreate, CountUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/customer-group/index.ts: -------------------------------------------------------------------------------- 1 | import CustomerGroupManage from 'pages/customer-group/CustomerGroupManage'; 2 | import CustomerGroupCreate from 'pages/customer-group/CustomerGroupCreate'; 3 | import CustomerGroupUpdate from 'pages/customer-group/CustomerGroupUpdate'; 4 | 5 | export { CustomerGroupManage as default, CustomerGroupCreate, CustomerGroupUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/customer-resource/index.ts: -------------------------------------------------------------------------------- 1 | import CustomerResourceManage from 'pages/customer-resource/CustomerResourceManage'; 2 | import CustomerResourceCreate from 'pages/customer-resource/CustomerResourceCreate'; 3 | import CustomerResourceUpdate from 'pages/customer-resource/CustomerResourceUpdate'; 4 | 5 | export { CustomerResourceManage as default, CustomerResourceCreate, CustomerResourceUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/customer-status/index.ts: -------------------------------------------------------------------------------- 1 | import CustomerStatusManage from 'pages/customer-status/CustomerStatusManage'; 2 | import CustomerStatusCreate from 'pages/customer-status/CustomerStatusCreate'; 3 | import CustomerStatusUpdate from 'pages/customer-status/CustomerStatusUpdate'; 4 | 5 | export { CustomerStatusManage as default, CustomerStatusCreate, CustomerStatusUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/customer/index.ts: -------------------------------------------------------------------------------- 1 | import CustomerManage from 'pages/customer/CustomerManage'; 2 | import CustomerCreate from 'pages/customer/CustomerCreate'; 3 | import CustomerUpdate from 'pages/customer/CustomerUpdate'; 4 | 5 | export { CustomerManage as default, CustomerCreate, CustomerUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/department/index.ts: -------------------------------------------------------------------------------- 1 | import DepartmentManage from 'pages/department/DepartmentManage'; 2 | import DepartmentCreate from 'pages/department/DepartmentCreate'; 3 | import DepartmentUpdate from 'pages/department/DepartmentUpdate'; 4 | 5 | export { DepartmentManage as default, DepartmentCreate, DepartmentUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/destination/index.ts: -------------------------------------------------------------------------------- 1 | import DestinationManage from 'pages/destination/DestinationManage'; 2 | import DestinationCreate from 'pages/destination/DestinationCreate'; 3 | import DestinationUpdate from 'pages/destination/DestinationUpdate'; 4 | 5 | export { DestinationManage as default, DestinationCreate, DestinationUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/district/index.ts: -------------------------------------------------------------------------------- 1 | import DistrictManage from 'pages/district/DistrictManage'; 2 | import DistrictCreate from 'pages/district/DistrictCreate'; 3 | import DistrictUpdate from 'pages/district/DistrictUpdate'; 4 | 5 | export { DistrictManage as default, DistrictCreate, DistrictUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/docket-reason/index.ts: -------------------------------------------------------------------------------- 1 | import DocketReasonManage from 'pages/docket-reason/DocketReasonManage'; 2 | import DocketReasonCreate from 'pages/docket-reason/DocketReasonCreate'; 3 | import DocketReasonUpdate from 'pages/docket-reason/DocketReasonUpdate'; 4 | 5 | export { DocketReasonManage as default, DocketReasonCreate, DocketReasonUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/docket/index.ts: -------------------------------------------------------------------------------- 1 | import DocketManage from 'pages/docket/DocketManage'; 2 | import DocketCreate from 'pages/docket/DocketCreate'; 3 | import DocketUpdate from 'pages/docket/DocketUpdate'; 4 | 5 | export { DocketManage as default, DocketCreate, DocketUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/employee/index.ts: -------------------------------------------------------------------------------- 1 | import EmployeeManage from 'pages/employee/EmployeeManage'; 2 | import EmployeeCreate from 'pages/employee/EmployeeCreate'; 3 | import EmployeeUpdate from 'pages/employee/EmployeeUpdate'; 4 | 5 | export { EmployeeManage as default, EmployeeCreate, EmployeeUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/guarantee/index.ts: -------------------------------------------------------------------------------- 1 | import GuaranteeManage from 'pages/guarantee/GuaranteeManage'; 2 | import GuaranteeCreate from 'pages/guarantee/GuaranteeCreate'; 3 | import GuaranteeUpdate from 'pages/guarantee/GuaranteeUpdate'; 4 | 5 | export { GuaranteeManage as default, GuaranteeCreate, GuaranteeUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/inventory/InventoryConfigs.ts: -------------------------------------------------------------------------------- 1 | import { Configs, TitleLink } from 'types'; 2 | import WarehouseConfigs from 'pages/warehouse/WarehouseConfigs'; 3 | import ResourceURL from 'constants/ResourceURL'; 4 | 5 | class InventoryConfigs extends Configs { 6 | static productInventoryResourceUrl = ResourceURL.PRODUCT_INVENTORY; 7 | static productInventoryResourceKey = 'product-inventories'; 8 | static manageTitle = 'Theo dõi tồn kho sản phẩm'; 9 | static manageTitleLinks: TitleLink[] = WarehouseConfigs.manageTitleLinks; 10 | } 11 | 12 | export default InventoryConfigs; 13 | -------------------------------------------------------------------------------- /electro-client/src/pages/inventory/index.ts: -------------------------------------------------------------------------------- 1 | import InventoryManage from 'pages/inventory/InventoryManage'; 2 | 3 | export { InventoryManage as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/job-level/index.ts: -------------------------------------------------------------------------------- 1 | import JobLevelManage from 'pages/job-level/JobLevelManage'; 2 | import JobLevelCreate from 'pages/job-level/JobLevelCreate'; 3 | import JobLevelUpdate from 'pages/job-level/JobLevelUpdate.'; 4 | 5 | export { JobLevelManage as default, JobLevelCreate, JobLevelUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/job-title/index.ts: -------------------------------------------------------------------------------- 1 | import JobTitleManage from 'pages/job-title/JobTitleManage'; 2 | import JobTitleCreate from 'pages/job-title/JobTitleCreate'; 3 | import JobTitleUpdate from 'pages/job-title/JobTitleUpdate'; 4 | 5 | export { JobTitleManage as default, JobTitleCreate, JobTitleUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/job-type/index.ts: -------------------------------------------------------------------------------- 1 | import JobTypeManage from 'pages/job-type/JobTypeManage'; 2 | import JobTypeCreate from 'pages/job-type/JobTypeCreate'; 3 | import JobTypeUpdate from 'pages/job-type/JobTypeUpdate'; 4 | 5 | export { JobTypeManage as default, JobTypeCreate, JobTypeUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/office/index.ts: -------------------------------------------------------------------------------- 1 | import OfficeManage from 'pages/office/OfficeManage'; 2 | import OfficeCreate from 'pages/office/OfficeCreate'; 3 | import OfficeUpdate from 'pages/office/OfficeUpdate'; 4 | 5 | export { OfficeManage as default, OfficeCreate, OfficeUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/order-cancellation-reason/index.ts: -------------------------------------------------------------------------------- 1 | import OrderCancellationReasonManage from 'pages/order-cancellation-reason/OrderCancellationReasonManage'; 2 | import OrderCancellationReasonCreate from 'pages/order-cancellation-reason/OrderCancellationReasonCreate'; 3 | import OrderCancellationReasonUpdate from 'pages/order-cancellation-reason/OrderCancellationReasonUpdate'; 4 | 5 | export { OrderCancellationReasonManage as default, OrderCancellationReasonCreate, OrderCancellationReasonUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/order-resource/index.ts: -------------------------------------------------------------------------------- 1 | import OrderResourceManage from 'pages/order-resource/OrderResourceManage'; 2 | import OrderResourceCreate from 'pages/order-resource/OrderResourceCreate'; 3 | import OrderResourceUpdate from 'pages/order-resource/OrderResourceUpdate'; 4 | 5 | export { OrderResourceManage as default, OrderResourceCreate, OrderResourceUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/order/index.ts: -------------------------------------------------------------------------------- 1 | import OrderManage from 'pages/order/OrderManage'; 2 | import OrderCreate from 'pages/order/OrderCreate'; 3 | import OrderUpdate from 'pages/order/OrderUpdate'; 4 | 5 | export { OrderManage as default, OrderCreate, OrderUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/payment-method/index.ts: -------------------------------------------------------------------------------- 1 | import PaymentMethodManage from 'pages/payment-method/PaymentMethodManage'; 2 | 3 | export { PaymentMethodManage as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/product/index.ts: -------------------------------------------------------------------------------- 1 | import ProductManage from 'pages/product/ProductManage'; 2 | import ProductCreate from 'pages/product/ProductCreate'; 3 | import ProductUpdate from 'pages/product/ProductUpdate'; 4 | 5 | export { ProductManage as default, ProductCreate, ProductUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/promotion/index.ts: -------------------------------------------------------------------------------- 1 | import PromotionManage from 'pages/promotion/PromotionManage'; 2 | import PromotionCreate from 'pages/promotion/PromotionCreate'; 3 | import PromotionUpdate from 'pages/promotion/PromotionUpdate'; 4 | 5 | export { PromotionManage as default, PromotionCreate, PromotionUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/property/index.ts: -------------------------------------------------------------------------------- 1 | import PropertyManage from 'pages/property/PropertyManage'; 2 | import PropertyCreate from 'pages/property/PropertyCreate'; 3 | import PropertyUpdate from 'pages/property/PropertyUpdate'; 4 | 5 | export { PropertyManage as default, PropertyCreate, PropertyUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/province/index.ts: -------------------------------------------------------------------------------- 1 | import ProvinceManage from 'pages/province/ProvinceManage'; 2 | import ProvinceCreate from 'pages/province/ProvinceCreate'; 3 | import ProvinceUpdate from 'pages/province/ProvinceUpdate'; 4 | 5 | export { ProvinceManage as default, ProvinceCreate, ProvinceUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/purchase-order/index.ts: -------------------------------------------------------------------------------- 1 | import PurchaseOrderManage from 'pages/purchase-order/PurchaseOrderManage'; 2 | import PurchaseOrderCreate from 'pages/purchase-order/PurchaseOrderCreate'; 3 | import PurchaseOrderUpdate from 'pages/purchase-order/PurchaseOrderUpdate'; 4 | 5 | export { PurchaseOrderManage as default, PurchaseOrderCreate, PurchaseOrderUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/review/ReviewConfigs.ts: -------------------------------------------------------------------------------- 1 | import { Configs, TitleLink } from 'types'; 2 | import ManagerPath from 'constants/ManagerPath'; 3 | import ResourceURL from 'constants/ResourceURL'; 4 | 5 | class ReviewConfigs extends Configs { 6 | static resourceUrl = ResourceURL.REVIEW; 7 | static resourceKey = 'reviews'; 8 | static manageTitle = 'Quản lý đánh giá sản phẩm'; 9 | static manageTitleLinks: TitleLink[] = [ 10 | { 11 | link: ManagerPath.REVIEW, 12 | label: 'Quản lý đánh giá sản phẩm', 13 | }, 14 | ]; 15 | } 16 | 17 | export default ReviewConfigs; 18 | -------------------------------------------------------------------------------- /electro-client/src/pages/review/index.ts: -------------------------------------------------------------------------------- 1 | import ReviewManage from 'pages/review/ReviewManage'; 2 | 3 | export { ReviewManage as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/reward-strategy/RewardStrategyConfigs.ts: -------------------------------------------------------------------------------- 1 | import { Configs, TitleLink } from 'types'; 2 | import ResourceURL from 'constants/ResourceURL'; 3 | import ManagerPath from 'constants/ManagerPath'; 4 | 5 | class RewardStrategyConfigs extends Configs { 6 | static resourceUrl = ResourceURL.REWARD_STRATEGY; 7 | static resourceKey = 'reward-strategies'; 8 | static manageTitle = 'Quản lý chiến lược điểm thưởng'; 9 | static manageTitleLinks: TitleLink[] = [ 10 | { 11 | link: ManagerPath.REWARD_STRATEGY, 12 | label: 'QL chiến lược điểm thưởng', 13 | }, 14 | ]; 15 | } 16 | 17 | export default RewardStrategyConfigs; 18 | -------------------------------------------------------------------------------- /electro-client/src/pages/reward-strategy/index.ts: -------------------------------------------------------------------------------- 1 | import RewardStrategyManage from 'pages/reward-strategy/RewardStrategyManage'; 2 | 3 | export { RewardStrategyManage as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/role/index.ts: -------------------------------------------------------------------------------- 1 | import RoleManage from 'pages/role/RoleManage'; 2 | import RoleCreate from 'pages/role/RoleCreate'; 3 | import RoleUpdate from 'pages/role/RoleUpdate'; 4 | 5 | export { RoleManage as default, RoleCreate, RoleUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/specification/index.ts: -------------------------------------------------------------------------------- 1 | import SpecificationManage from 'pages/specification/SpecificationManage'; 2 | import SpecificationCreate from 'pages/specification/SpecificationCreate'; 3 | import SpecificationUpdate from 'pages/specification/SpecificationUpdate'; 4 | 5 | export { SpecificationManage as default, SpecificationCreate, SpecificationUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/supplier/index.ts: -------------------------------------------------------------------------------- 1 | import SupplierManage from 'pages/supplier/SupplierManage'; 2 | import SupplierCreate from 'pages/supplier/SupplierCreate'; 3 | import SupplierUpdate from 'pages/supplier/SupplierUpdate'; 4 | 5 | export { SupplierManage as default, SupplierCreate, SupplierUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/tag/index.ts: -------------------------------------------------------------------------------- 1 | import TagManage from 'pages/tag/TagManage'; 2 | import TagCreate from 'pages/tag/TagCreate'; 3 | import TagUpdate from 'pages/tag/TagUpdate'; 4 | 5 | export { TagManage as default, TagCreate, TagUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/transfer/index.ts: -------------------------------------------------------------------------------- 1 | import TransferManage from 'pages/transfer/TransferManage'; 2 | import TransferCreate from 'pages/transfer/TransferCreate'; 3 | import TransferUpdate from 'pages/transfer/TransferUpdate'; 4 | 5 | export { TransferManage as default, TransferCreate, TransferUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/unit/index.ts: -------------------------------------------------------------------------------- 1 | import UnitManage from 'pages/unit/UnitManage'; 2 | import UnitCreate from 'pages/unit/UnitCreate'; 3 | import UnitUpdate from 'pages/unit/UnitUpdate'; 4 | 5 | export { UnitManage as default, UnitCreate, UnitUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/user/index.ts: -------------------------------------------------------------------------------- 1 | import UserManage from 'pages/user/UserManage'; 2 | import UserCreate from 'pages/user/UserCreate'; 3 | import UserUpdate from 'pages/user/UserUpdate'; 4 | 5 | export { UserManage as default, UserCreate, UserUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/voucher/index.ts: -------------------------------------------------------------------------------- 1 | import VoucherManage from 'pages/voucher/VoucherManage'; 2 | 3 | export { VoucherManage as default }; 4 | -------------------------------------------------------------------------------- /electro-client/src/pages/ward/WardConfigs.ts: -------------------------------------------------------------------------------- 1 | import { Configs } from 'types'; 2 | import ManagerPath from 'constants/ManagerPath'; 3 | import ResourceURL from 'constants/ResourceURL'; 4 | 5 | class WardConfigs extends Configs { 6 | static managerPath = ManagerPath.WARD; 7 | static resourceUrl = ResourceURL.WARD; 8 | static resourceKey = 'wards'; 9 | static createTitle = 'Thêm phường xã'; 10 | static updateTitle = 'Cập nhật phường xã'; 11 | static manageTitle = 'Quản lý phường xã'; 12 | } 13 | 14 | export default WardConfigs; 15 | -------------------------------------------------------------------------------- /electro-client/src/pages/warehouse/index.ts: -------------------------------------------------------------------------------- 1 | import WarehouseManage from 'pages/warehouse/WarehouseManage'; 2 | import WarehouseCreate from 'pages/warehouse/WarehouseCreate'; 3 | import WarehouseUpdate from 'pages/warehouse/WarehouseUpdate'; 4 | 5 | export { WarehouseManage as default, WarehouseCreate, WarehouseUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/pages/waybill/index.ts: -------------------------------------------------------------------------------- 1 | import WaybillManage from 'pages/waybill/WaybillManage'; 2 | import WaybillCreate from 'pages/waybill/WaybillCreate'; 3 | import WaybillUpdate from 'pages/waybill/WaybillUpdate'; 4 | 5 | export { WaybillManage as default, WaybillCreate, WaybillUpdate }; 6 | -------------------------------------------------------------------------------- /electro-client/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /electro-client/src/reportWebVitals.ts: -------------------------------------------------------------------------------- 1 | import { ReportHandler } from 'web-vitals'; 2 | 3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => { 4 | if (onPerfEntry && onPerfEntry instanceof Function) { 5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 6 | getCLS(onPerfEntry); 7 | getFID(onPerfEntry); 8 | getFCP(onPerfEntry); 9 | getLCP(onPerfEntry); 10 | getTTFB(onPerfEntry); 11 | }); 12 | } 13 | }; 14 | 15 | export default reportWebVitals; 16 | -------------------------------------------------------------------------------- /electro-client/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /electro-client/src/stores/create-admin-site-slice.ts: -------------------------------------------------------------------------------- 1 | import { SliceCreator } from 'stores/use-app-store'; 2 | 3 | export interface AdminSiteState { 4 | opened: boolean; 5 | toggleOpened: () => void; 6 | } 7 | 8 | const initialAdminSiteState = { 9 | opened: false, 10 | }; 11 | 12 | const createAdminSiteSlice: SliceCreator = (set) => ({ 13 | ...initialAdminSiteState, 14 | toggleOpened: () => set((state) => ({ opened: !state.opened })), 15 | }); 16 | 17 | export default createAdminSiteSlice; 18 | -------------------------------------------------------------------------------- /electro-client/src/types/CollectionWrapper.ts: -------------------------------------------------------------------------------- 1 | export class CollectionWrapper { 2 | content: T[]; 3 | totalElements: number; 4 | 5 | constructor(content: T[]) { 6 | this.content = content; 7 | this.totalElements = content.length; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /electro-client/src/types/Configs.ts: -------------------------------------------------------------------------------- 1 | import { TitleLink } from 'types/TitleLink'; 2 | import { EntityPropertySchema } from 'types/EntityProperty'; 3 | 4 | export abstract class Configs { 5 | static managerPath: string; 6 | static resourceUrl: string; 7 | static resourceKey: string; 8 | static createTitle: string; 9 | static updateTitle: string; 10 | static manageTitle: string; 11 | static manageTitleLinks: TitleLink[]; 12 | protected static _rawProperties: EntityPropertySchema; 13 | static properties: EntityPropertySchema; 14 | static initialCreateUpdateFormValues: object; 15 | static createUpdateFormSchema: object; 16 | } 17 | -------------------------------------------------------------------------------- /electro-client/src/types/EntityProperty.ts: -------------------------------------------------------------------------------- 1 | export enum EntityPropertyType { 2 | STRING = 'string', 3 | NUMBER = 'number', 4 | BOOLEAN = 'boolean', 5 | DATE = 'date', 6 | ARRAY = 'array', 7 | OPTION = 'option', 8 | COLLECTION = 'collection', 9 | PLACEHOLDER = 'placeholder', 10 | } 11 | 12 | export interface EntityPropertySpec { 13 | label: string, 14 | tableLabel?: string, 15 | type: EntityPropertyType, 16 | isShowInTable?: boolean, 17 | isNotAddToSortCriteria?: boolean, 18 | isNotAddToFilterCriteria?: boolean, 19 | } 20 | 21 | export type EntityPropertySchema = Record; 22 | -------------------------------------------------------------------------------- /electro-client/src/types/FileWithPreview.ts: -------------------------------------------------------------------------------- 1 | export interface FileWithPreview extends File { 2 | preview: string; 3 | } 4 | -------------------------------------------------------------------------------- /electro-client/src/types/SelectOption.ts: -------------------------------------------------------------------------------- 1 | export interface SelectOption { 2 | value: string; 3 | label: string; 4 | disabled?: boolean; 5 | } 6 | -------------------------------------------------------------------------------- /electro-client/src/types/TitleLink.ts: -------------------------------------------------------------------------------- 1 | export interface TitleLink { 2 | link: string, 3 | label: string, 4 | } 5 | -------------------------------------------------------------------------------- /electro-client/src/types/Utility.ts: -------------------------------------------------------------------------------- 1 | export type Nullable = T | null; 2 | export type Empty = Record; 3 | -------------------------------------------------------------------------------- /electro-client/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from 'types/TitleLink'; 2 | export * from 'types/SelectOption'; 3 | export * from 'types/Utility'; 4 | export * from 'types/EntityProperty'; 5 | export * from 'types/Configs'; 6 | export * from 'types/CollectionWrapper'; 7 | export * from 'types/FileWithPreview'; 8 | export * from 'types/ClientUI'; 9 | -------------------------------------------------------------------------------- /electro-client/src/utils/MessageUtils.ts: -------------------------------------------------------------------------------- 1 | class MessageUtils { 2 | static min = (subject: string, value: number) => `${subject} có ít nhất ${value} ký tự`; 3 | static max = (subject: string, value: number) => `${subject} chỉ có nhiều nhất ${value} ký tự`; 4 | } 5 | 6 | export default MessageUtils; 7 | -------------------------------------------------------------------------------- /electro-client/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "src", 4 | "target": "es5", 5 | "lib": [ 6 | "dom", 7 | "dom.iterable", 8 | "esnext" 9 | ], 10 | "allowJs": true, 11 | "skipLibCheck": true, 12 | "esModuleInterop": true, 13 | "allowSyntheticDefaultImports": true, 14 | "strict": true, 15 | "forceConsistentCasingInFileNames": true, 16 | "noFallthroughCasesInSwitch": true, 17 | "module": "esnext", 18 | "moduleResolution": "node", 19 | "resolveJsonModule": true, 20 | "isolatedModules": true, 21 | "noEmit": true, 22 | "jsx": "react-jsx" 23 | }, 24 | "include": [ 25 | "src" 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /electro-server/.dockerignore: -------------------------------------------------------------------------------- 1 | .idea 2 | *.iml 3 | *.iws 4 | -------------------------------------------------------------------------------- /electro-server/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | 35 | ### Custom ### 36 | /image-dir/ 37 | /src/main/java/com/electro/Test.java 38 | -------------------------------------------------------------------------------- /electro-server/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daphdev/electro/4b4f2a91294c56ed94ea49dd4cf5cadde33b113c/electro-server/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /electro-server/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar 3 | -------------------------------------------------------------------------------- /electro-server/lombok.config: -------------------------------------------------------------------------------- 1 | # Source: https://stackoverflow.com/a/50287955 2 | lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Qualifier 3 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/ElectroApplication.java: -------------------------------------------------------------------------------- 1 | package com.electro; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class ElectroApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(ElectroApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/Test.java: -------------------------------------------------------------------------------- 1 | package com.electro; 2 | 3 | import java.io.IOException; 4 | 5 | public class Test { 6 | 7 | public static void main(String[] args) throws IOException {} 8 | 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/config/payment/paypal/PaypalConfig.java: -------------------------------------------------------------------------------- 1 | package com.electro.config.payment.paypal; 2 | 3 | import lombok.Data; 4 | import lombok.RequiredArgsConstructor; 5 | import org.springframework.beans.factory.annotation.Value; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | @Data 9 | @Configuration 10 | @RequiredArgsConstructor 11 | public class PaypalConfig { 12 | 13 | @Value("${paypal.baseUrl}") 14 | private String baseUrl; 15 | 16 | @Value("${paypal.clientId}") 17 | private String clientId; 18 | 19 | @Value("${paypal.secret}") 20 | private String secret; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/constant/AppConstants.java: -------------------------------------------------------------------------------- 1 | package com.electro.constant; 2 | 3 | public interface AppConstants { 4 | String DEFAULT_PAGE_NUMBER = "1"; 5 | String DEFAULT_PAGE_SIZE = "5"; 6 | String DEFAULT_SORT = "id,desc"; 7 | String FRONTEND_HOST = "http://localhost:3000"; 8 | String BACKEND_HOST = "http://localhost:8085"; 9 | double DEFAULT_TAX = 0.1; 10 | } 11 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/constant/FieldName.java: -------------------------------------------------------------------------------- 1 | package com.electro.constant; 2 | 3 | public interface FieldName { 4 | String ID = "id"; 5 | String SLUG = "slug"; 6 | String USER_ID = "user_id"; 7 | String PRODUCT_ID = "product_id"; 8 | String ORDER_CODE = "order_code"; 9 | String USERNAME = "username"; 10 | String PAYPAL_ORDER_ID = "paypal_order_id"; 11 | String WAYBILL_CODE = "waybill_code"; 12 | String CODE = "code"; 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/CollectionWrapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto; 2 | 3 | import lombok.Data; 4 | import lombok.NoArgsConstructor; 5 | 6 | import java.util.List; 7 | 8 | @Data 9 | @NoArgsConstructor 10 | public class CollectionWrapper { 11 | private List content; 12 | private long totalElements; 13 | 14 | public CollectionWrapper(List content) { 15 | this.content = content; 16 | this.totalElements = content.size(); 17 | } 18 | 19 | public static CollectionWrapper of(List content) { 20 | return new CollectionWrapper<>(content); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/address/AddressRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.address; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class AddressRequest { 7 | private String line; 8 | private Long provinceId; 9 | private Long districtId; 10 | private Long wardId; 11 | } 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/address/DistrictRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.address; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class DistrictRequest { 7 | private String name; 8 | private String code; 9 | private Long provinceId; 10 | } 11 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/address/DistrictResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.address; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class DistrictResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String name; 13 | private String code; 14 | private ProvinceResponse province; 15 | } 16 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/address/ProvinceRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.address; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class ProvinceRequest { 7 | private String name; 8 | private String code; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/address/ProvinceResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.address; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class ProvinceResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String name; 13 | private String code; 14 | } 15 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/address/WardRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.address; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class WardRequest { 7 | private String name; 8 | private String code; 9 | private Long districtId; 10 | } 11 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/address/WardResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.address; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class WardResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String name; 13 | private String code; 14 | private DistrictResponse district; 15 | } 16 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/authentication/JwtResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.authentication; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | @AllArgsConstructor 10 | public class JwtResponse { 11 | private String message; 12 | private String token; 13 | private String refreshToken; 14 | private Instant createdAt; 15 | } 16 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/authentication/LoginRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.authentication; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class LoginRequest { 7 | private String username; 8 | private String password; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/authentication/RefreshTokenRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.authentication; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class RefreshTokenRequest { 7 | private String refreshToken; 8 | } 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/authentication/RegistrationRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.authentication; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class RegistrationRequest { 7 | private Long userId; 8 | private String token; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/authentication/RegistrationResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.authentication; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | 6 | @Data 7 | @AllArgsConstructor 8 | public class RegistrationResponse { 9 | private Long userId; 10 | } 11 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/authentication/ResetPasswordRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.authentication; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class ResetPasswordRequest { 7 | private String token; 8 | private String email; 9 | private String password; 10 | } 11 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/authentication/RoleRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.authentication; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class RoleRequest { 7 | private String code; 8 | private String name; 9 | private Integer status; 10 | } 11 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/authentication/RoleResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.authentication; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class RoleResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String code; 13 | private String name; 14 | private Integer status; 15 | } 16 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/authentication/Role_UserRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.authentication; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class Role_UserRequest { 7 | private Long id; 8 | private String code; 9 | private String name; 10 | private Integer status; 11 | } 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/authentication/UserRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.authentication; 2 | 3 | import com.electro.dto.address.AddressRequest; 4 | import lombok.Data; 5 | 6 | import java.util.Set; 7 | 8 | @Data 9 | public class UserRequest { 10 | private String username; 11 | private String password; 12 | private String fullname; 13 | private String email; 14 | private String phone; 15 | private String gender; 16 | private AddressRequest address; 17 | private String avatar; 18 | private Integer status; 19 | private Set roles; 20 | } 21 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/authentication/UserResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.authentication; 2 | 3 | import com.electro.dto.address.AddressResponse; 4 | import lombok.Data; 5 | 6 | import java.time.Instant; 7 | import java.util.Set; 8 | 9 | @Data 10 | public class UserResponse { 11 | private Long id; 12 | private Instant createdAt; 13 | private Instant updatedAt; 14 | private String username; 15 | private String fullname; 16 | private String email; 17 | private String phone; 18 | private String gender; 19 | private AddressResponse address; 20 | private String avatar; 21 | private Integer status; 22 | private Set roles; 23 | } 24 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/cashbook/ClientPaymentMethodResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.cashbook; 2 | 3 | import com.electro.entity.cashbook.PaymentMethodType; 4 | import lombok.Data; 5 | 6 | @Data 7 | public class ClientPaymentMethodResponse { 8 | private Long paymentMethodId; 9 | private String paymentMethodName; 10 | private PaymentMethodType paymentMethodCode; 11 | } 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/cashbook/PaymentMethodRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.cashbook; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class PaymentMethodRequest { 7 | private Integer status; 8 | } 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/cashbook/PaymentMethodResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.cashbook; 2 | 3 | import com.electro.entity.cashbook.PaymentMethodType; 4 | import lombok.Data; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | public class PaymentMethodResponse { 10 | private Long id; 11 | private Instant createdAt; 12 | private Instant updatedAt; 13 | private String name; 14 | private PaymentMethodType code; 15 | private Integer status; 16 | } 17 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/chat/ClientRoomExistenceResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.chat; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | @Data 8 | public class ClientRoomExistenceResponse { 9 | private boolean roomExistence; 10 | private RoomResponse roomResponse; 11 | private List roomRecentMessages; 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/chat/MessageRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.chat; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | 6 | @Data 7 | @AllArgsConstructor 8 | public class MessageRequest { 9 | private String content; 10 | private Integer status; 11 | private Long userId; 12 | private Long roomId; 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/chat/MessageResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.chat; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | @AllArgsConstructor 10 | public class MessageResponse { 11 | private Long id; 12 | private Instant createdAt; 13 | private Instant updatedAt; 14 | private String content; 15 | private Integer status; 16 | private UserResponse user; 17 | 18 | @Data 19 | @AllArgsConstructor 20 | public static class UserResponse { 21 | private Long id; 22 | private String username; 23 | private String fullname; 24 | private String email; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/chat/RoomRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.chat; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class RoomRequest { 7 | private String name; 8 | private Long userId; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/chat/RoomResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.chat; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | @AllArgsConstructor 10 | public class RoomResponse { 11 | private Long id; 12 | private Instant createdAt; 13 | private Instant updatedAt; 14 | private String name; 15 | private UserResponse user; 16 | private MessageResponse lastMessage; 17 | 18 | @Data 19 | @AllArgsConstructor 20 | public static class UserResponse { 21 | private Long id; 22 | private String username; 23 | private String fullname; 24 | private String email; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientBrandResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | @Data 7 | @Accessors(chain = true) 8 | public class ClientBrandResponse { 9 | private Long brandId; 10 | private String brandName; 11 | } 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientCartRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | import java.util.Set; 7 | 8 | @Data 9 | public class ClientCartRequest { 10 | @Nullable 11 | private Long cartId; 12 | private Long userId; 13 | private Set cartItems; 14 | private Integer status; 15 | private UpdateQuantityType updateQuantityType; 16 | } 17 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientCartResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.Set; 6 | 7 | @Data 8 | public class ClientCartResponse { 9 | private Long cartId; 10 | private Set cartItems; 11 | } 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientCartVariantKeyRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class ClientCartVariantKeyRequest { 7 | private Long cartId; 8 | private Long variantId; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientCartVariantRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class ClientCartVariantRequest { 7 | private Long variantId; 8 | private Integer quantity; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientCategoryResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import com.fasterxml.jackson.annotation.JsonInclude; 4 | import lombok.Data; 5 | import lombok.experimental.Accessors; 6 | import org.springframework.lang.Nullable; 7 | 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | @Data 12 | @Accessors(chain = true) 13 | @JsonInclude(JsonInclude.Include.NON_NULL) 14 | public class ClientCategoryResponse { 15 | private String categoryName; 16 | private String categorySlug; 17 | private List categoryChildren = new ArrayList<>(); 18 | @Nullable 19 | private ClientCategoryResponse categoryParent; 20 | } 21 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientConfirmedOrderResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import com.electro.entity.cashbook.PaymentMethodType; 4 | import lombok.Data; 5 | import org.springframework.lang.Nullable; 6 | 7 | @Data 8 | public class ClientConfirmedOrderResponse { 9 | private String orderCode; 10 | private PaymentMethodType orderPaymentMethodType; 11 | @Nullable 12 | private String orderPaypalCheckoutLink; 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientEmailSettingUserRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class ClientEmailSettingUserRequest { 7 | private String email; 8 | } 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientFilterResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | import java.math.BigDecimal; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | @Data 11 | @Accessors(chain = true) 12 | public class ClientFilterResponse { 13 | // TODO: Complete filterPriceQuartiles 14 | private List filterPriceQuartiles = List.of(new BigDecimal("10000000"), new BigDecimal("50000000")); 15 | private List filterBrands = new ArrayList<>(); 16 | } 17 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientPasswordSettingUserRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class ClientPasswordSettingUserRequest { 7 | private String oldPassword; 8 | private String newPassword; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientPersonalSettingUserRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import com.electro.dto.address.AddressRequest; 4 | import lombok.Data; 5 | 6 | @Data 7 | public class ClientPersonalSettingUserRequest { 8 | private String username; 9 | private String fullname; 10 | private String gender; 11 | private AddressRequest address; 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientPhoneSettingUserRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class ClientPhoneSettingUserRequest { 7 | private String phone; 8 | } 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientPreorderRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | @Data 7 | @Accessors(chain = true) 8 | public class ClientPreorderRequest { 9 | private Long userId; 10 | private Long productId; 11 | private Integer status; 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientPreorderResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | @Accessors(chain = true) 10 | public class ClientPreorderResponse { 11 | private Long preorderId; 12 | private Instant preorderCreatedAt; 13 | private Instant preorderUpdatedAt; 14 | private ClientListedProductResponse preorderProduct; 15 | private Integer preorderStatus; 16 | } 17 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientPromotionResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class ClientPromotionResponse { 7 | private Long promotionId; 8 | private Integer promotionPercent; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientReviewRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | @Data 7 | @Accessors(chain = true) 8 | public class ClientReviewRequest { 9 | private Long userId; 10 | private Long productId; 11 | private Integer ratingScore; 12 | private String content; 13 | private Integer status; 14 | } 15 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientReviewResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | import org.springframework.lang.Nullable; 6 | 7 | import java.time.Instant; 8 | 9 | @Data 10 | @Accessors(chain = true) 11 | public class ClientReviewResponse { 12 | private Long reviewId; 13 | private Instant reviewCreatedAt; 14 | private Instant reviewUpdatedAt; 15 | private ClientListedProductResponse reviewProduct; 16 | private Integer reviewRatingScore; 17 | private String reviewContent; 18 | @Nullable 19 | private String reviewReply; 20 | private Integer reviewStatus; 21 | } 22 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientRewardLogResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import com.electro.entity.reward.RewardType; 4 | import lombok.Data; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | public class ClientRewardLogResponse { 10 | private Long rewardLogId; 11 | private Instant rewardLogCreatedAt; 12 | private Integer rewardLogScore; 13 | private RewardType rewardLogType; 14 | private String rewardLogNote; 15 | } 16 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientRewardResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | @Data 8 | public class ClientRewardResponse { 9 | private Integer rewardTotalScore; 10 | private List rewardLogs; 11 | } 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientSimpleOrderRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import com.electro.entity.cashbook.PaymentMethodType; 4 | import lombok.Data; 5 | 6 | @Data 7 | public class ClientSimpleOrderRequest { 8 | private PaymentMethodType paymentMethodType; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientSimpleOrderResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | 5 | import java.math.BigDecimal; 6 | import java.time.Instant; 7 | import java.util.Set; 8 | 9 | @Data 10 | public class ClientSimpleOrderResponse { 11 | private Long orderId; 12 | private Instant orderCreatedAt; 13 | private String orderCode; 14 | private Integer orderStatus; 15 | private BigDecimal orderTotalPay; 16 | private Set orderItems; 17 | private Integer orderPaymentStatus; 18 | } 19 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientWishRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class ClientWishRequest { 7 | private Long userId; 8 | private Long productId; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/ClientWishResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | @Accessors(chain = true) 10 | public class ClientWishResponse { 11 | private Long wishId; 12 | private Instant wishCreatedAt; 13 | private ClientListedProductResponse wishProduct; 14 | } 15 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/client/UpdateQuantityType.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.client; 2 | 3 | public enum UpdateQuantityType { 4 | OVERRIDE, 5 | INCREMENTAL 6 | } 7 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/customer/CustomerGroupRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.customer; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class CustomerGroupRequest { 7 | private String code; 8 | private String name; 9 | private String description; 10 | private String color; 11 | private Integer status; 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/customer/CustomerGroupResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.customer; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class CustomerGroupResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String code; 13 | private String name; 14 | private String description; 15 | private String color; 16 | private Integer status; 17 | } 18 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/customer/CustomerRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.customer; 2 | 3 | import com.electro.dto.authentication.UserRequest; 4 | import lombok.Data; 5 | 6 | @Data 7 | public class CustomerRequest { 8 | private UserRequest user; 9 | private Long customerGroupId; 10 | private Long customerStatusId; 11 | private Long customerResourceId; 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/customer/CustomerResourceRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.customer; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class CustomerResourceRequest { 7 | private String code; 8 | private String name; 9 | private String description; 10 | private String color; 11 | private Integer status; 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/customer/CustomerResourceResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.customer; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class CustomerResourceResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String code; 13 | private String name; 14 | private String description; 15 | private String color; 16 | private Integer status; 17 | } 18 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/customer/CustomerResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.customer; 2 | 3 | import com.electro.dto.authentication.UserResponse; 4 | import lombok.Data; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | public class CustomerResponse { 10 | private Long id; 11 | private Instant createdAt; 12 | private Instant updatedAt; 13 | private UserResponse user; 14 | private CustomerGroupResponse customerGroup; 15 | private CustomerStatusResponse customerStatus; 16 | private CustomerResourceResponse customerResource; 17 | } 18 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/customer/CustomerStatusRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.customer; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class CustomerStatusRequest { 7 | private String code; 8 | private String name; 9 | private String description; 10 | private String color; 11 | private Integer status; 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/customer/CustomerStatusResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.customer; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class CustomerStatusResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String code; 13 | private String name; 14 | private String description; 15 | private String color; 16 | private Integer status; 17 | } 18 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/employee/DepartmentRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.employee; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class DepartmentRequest { 7 | private String name; 8 | private Integer status; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/employee/DepartmentResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.employee; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class DepartmentResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String name; 13 | private Integer status; 14 | } 15 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/employee/EmployeeRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.employee; 2 | 3 | import com.electro.dto.authentication.UserRequest; 4 | import lombok.Data; 5 | 6 | @Data 7 | public class EmployeeRequest { 8 | private UserRequest user; 9 | private Long officeId; 10 | private Long departmentId; 11 | private Long jobTypeId; 12 | private Long jobLevelId; 13 | private Long jobTitleId; 14 | } 15 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/employee/EmployeeResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.employee; 2 | 3 | import com.electro.dto.authentication.UserResponse; 4 | import lombok.Data; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | public class EmployeeResponse { 10 | private Long id; 11 | private Instant createdAt; 12 | private Instant updatedAt; 13 | private UserResponse user; 14 | private OfficeResponse office; 15 | private DepartmentResponse department; 16 | private JobTypeResponse jobType; 17 | private JobLevelResponse jobLevel; 18 | private JobTitleResponse jobTitle; 19 | } 20 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/employee/JobLevelRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.employee; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class JobLevelRequest { 7 | private String name; 8 | private Integer status; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/employee/JobLevelResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.employee; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class JobLevelResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String name; 13 | private Integer status; 14 | } 15 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/employee/JobTitleRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.employee; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class JobTitleRequest { 7 | private String name; 8 | private Integer status; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/employee/JobTitleResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.employee; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class JobTitleResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String name; 13 | private Integer status; 14 | } 15 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/employee/JobTypeRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.employee; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class JobTypeRequest { 7 | private String name; 8 | private Integer status; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/employee/JobTypeResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.employee; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class JobTypeResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String name; 13 | private Integer status; 14 | } 15 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/employee/OfficeRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.employee; 2 | 3 | import com.electro.dto.address.AddressRequest; 4 | import lombok.Data; 5 | 6 | @Data 7 | public class OfficeRequest { 8 | private String name; 9 | private AddressRequest address; 10 | private Integer status; 11 | } 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/employee/OfficeResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.employee; 2 | 3 | import com.electro.dto.address.AddressResponse; 4 | import lombok.Data; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | public class OfficeResponse { 10 | private Long id; 11 | private Instant createdAt; 12 | private Instant updatedAt; 13 | private String name; 14 | private AddressResponse address; 15 | private Integer status; 16 | } 17 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/general/EventInitiationResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.general; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | 6 | @Data 7 | @AllArgsConstructor 8 | public class EventInitiationResponse { 9 | private String eventSourceUuid; 10 | } 11 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/general/ImageRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.general; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | @Data 7 | public class ImageRequest { 8 | private @Nullable Long id; 9 | private String name; 10 | private String path; 11 | private String contentType; 12 | private Long size; 13 | private String group; 14 | private Boolean isThumbnail; 15 | private Boolean isEliminated; 16 | } 17 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/general/ImageResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.general; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class ImageResponse { 7 | private Long id; 8 | private String name; 9 | private String path; 10 | private String contentType; 11 | private Long size; 12 | private String group; 13 | private Boolean isThumbnail; 14 | private Boolean isEliminated; 15 | } 16 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/general/NotificationRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.general; 2 | 3 | import com.electro.entity.general.NotificationType; 4 | import lombok.Data; 5 | import org.springframework.lang.Nullable; 6 | 7 | @Data 8 | public class NotificationRequest { 9 | private Long userId; 10 | private NotificationType type; 11 | private String message; 12 | @Nullable 13 | private String anchor; 14 | private Integer status; 15 | } 16 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/general/NotificationResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.general; 2 | 3 | import com.electro.entity.general.NotificationType; 4 | import lombok.Data; 5 | import org.springframework.lang.Nullable; 6 | 7 | import java.time.Instant; 8 | 9 | @Data 10 | public class NotificationResponse { 11 | private Long id; 12 | private Instant createdAt; 13 | private NotificationType type; 14 | private String message; 15 | @Nullable 16 | private String anchor; 17 | private Integer status; 18 | } 19 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/general/UploadedImageResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.general; 2 | 3 | import lombok.Value; 4 | 5 | @Value 6 | public class UploadedImageResponse { 7 | String name; 8 | String path; 9 | String contentType; 10 | long size; 11 | } 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/CountRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | import java.util.Set; 7 | 8 | @Data 9 | public class CountRequest { 10 | private String code; 11 | private Long warehouseId; 12 | private Set countVariants; 13 | @Nullable 14 | private String note; 15 | private Integer status; 16 | } 17 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/CountResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | import java.time.Instant; 7 | import java.util.Set; 8 | 9 | @Data 10 | public class CountResponse { 11 | private Long id; 12 | private Instant createdAt; 13 | private Instant updatedAt; 14 | private String code; 15 | private WarehouseResponse warehouse; 16 | private Set countVariants; 17 | @Nullable 18 | private String note; 19 | private Integer status; 20 | } 21 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/CountVariantKeyRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class CountVariantKeyRequest { 7 | private Long countId; 8 | private Long variantId; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/CountVariantRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class CountVariantRequest { 7 | private Long variantId; 8 | private Integer inventory; 9 | private Integer actualInventory; 10 | } 11 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/DestinationRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import com.electro.dto.address.AddressRequest; 4 | import lombok.Data; 5 | import org.springframework.lang.Nullable; 6 | 7 | @Data 8 | public class DestinationRequest { 9 | @Nullable 10 | private String contactFullname; 11 | @Nullable 12 | private String contactEmail; 13 | @Nullable 14 | private String contactPhone; 15 | private AddressRequest address; 16 | private Integer status; 17 | } 18 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/DestinationResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import com.electro.dto.address.AddressResponse; 4 | import lombok.Data; 5 | import org.springframework.lang.Nullable; 6 | 7 | import java.time.Instant; 8 | 9 | @Data 10 | public class DestinationResponse { 11 | private Long id; 12 | private Instant createdAt; 13 | private Instant updatedAt; 14 | @Nullable 15 | private String contactFullname; 16 | @Nullable 17 | private String contactEmail; 18 | @Nullable 19 | private String contactPhone; 20 | private AddressResponse address; 21 | private Integer status; 22 | } 23 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/DocketReasonRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class DocketReasonRequest { 7 | private String name; 8 | private Integer status; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/DocketReasonResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class DocketReasonResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String name; 13 | private Integer status; 14 | } 15 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/DocketRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | import java.util.Set; 7 | 8 | @Data 9 | public class DocketRequest { 10 | private Integer type; 11 | private String code; 12 | private Long reasonId; 13 | private Long warehouseId; 14 | private Set docketVariants; 15 | @Nullable 16 | private Long purchaseOrderId; 17 | @Nullable 18 | private Long orderId; 19 | @Nullable 20 | private String note; 21 | private Integer status; 22 | } 23 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/DocketVariantKeyRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class DocketVariantKeyRequest { 7 | private Long docketId; 8 | private Long variantId; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/DocketVariantRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class DocketVariantRequest { 7 | private Long variantId; 8 | private Integer quantity; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/ProductInventoryLimitRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | @Data 7 | public class ProductInventoryLimitRequest { 8 | private Long productId; 9 | @Nullable 10 | private Integer minimumLimit; 11 | @Nullable 12 | private Integer maximumLimit; 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/ProductInventoryLimitResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | public class ProductInventoryLimitResponse { 10 | private Long id; 11 | private Instant createdAt; 12 | private Instant updatedAt; 13 | @Nullable 14 | private Integer minimumLimit; 15 | @Nullable 16 | private Integer maximumLimit; 17 | } 18 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/PurchaseOrderRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | import java.util.Set; 7 | 8 | @Data 9 | public class PurchaseOrderRequest { 10 | private String code; 11 | private Long supplierId; 12 | private Set purchaseOrderVariants; 13 | private Long destinationId; 14 | private Double totalAmount; 15 | @Nullable 16 | private String note; 17 | private Integer status; 18 | } 19 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/PurchaseOrderVariantKeyRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class PurchaseOrderVariantKeyRequest { 7 | private Long purchaseOrderId; 8 | private Long variantId; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/PurchaseOrderVariantRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class PurchaseOrderVariantRequest { 7 | private Long variantId; 8 | private Double cost; 9 | private Integer quantity; 10 | private Double amount; 11 | } 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/StorageLocationRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class StorageLocationRequest { 7 | private Long warehouseId; 8 | private Long variantId; 9 | private String name; 10 | } 11 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/StorageLocationResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import com.electro.dto.product.VariantResponse; 4 | import lombok.Data; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | public class StorageLocationResponse { 10 | private Long id; 11 | private Instant createdAt; 12 | private Instant updatedAt; 13 | private WarehouseResponse warehouse; 14 | private VariantResponse variant; 15 | private String name; 16 | } 17 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/TransferRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | @Data 7 | public class TransferRequest { 8 | private String code; 9 | private DocketRequest exportDocket; 10 | private DocketRequest importDocket; 11 | @Nullable 12 | private String note; 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/TransferResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | public class TransferResponse { 10 | private Long id; 11 | private Instant createdAt; 12 | private Instant updatedAt; 13 | private String code; 14 | private DocketResponse exportDocket; 15 | private DocketResponse importDocket; 16 | @Nullable 17 | private String note; 18 | } 19 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/VariantInventoryLimitRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | @Data 7 | public class VariantInventoryLimitRequest { 8 | private Long variantId; 9 | @Nullable 10 | private Integer minimumLimit; 11 | @Nullable 12 | private Integer maximumLimit; 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/VariantInventoryLimitResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | public class VariantInventoryLimitResponse { 10 | private Long id; 11 | private Instant createdAt; 12 | private Instant updatedAt; 13 | @Nullable 14 | private Integer minimumLimit; 15 | @Nullable 16 | private Integer maximumLimit; 17 | } 18 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/WarehouseRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import com.electro.dto.address.AddressRequest; 4 | import lombok.Data; 5 | import org.springframework.lang.Nullable; 6 | 7 | @Data 8 | public class WarehouseRequest { 9 | private String code; 10 | private String name; 11 | @Nullable 12 | private AddressRequest address; 13 | private Integer status; 14 | } 15 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/inventory/WarehouseResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.inventory; 2 | 3 | import com.electro.dto.address.AddressResponse; 4 | import lombok.Data; 5 | import org.springframework.lang.Nullable; 6 | 7 | import java.time.Instant; 8 | 9 | @Data 10 | public class WarehouseResponse { 11 | private Long id; 12 | private Instant createdAt; 13 | private Instant updatedAt; 14 | private String code; 15 | private String name; 16 | @Nullable 17 | private AddressResponse address; 18 | private Integer status; 19 | } 20 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/json/ProductPropertyItem.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.json; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.List; 6 | 7 | @Data 8 | public class ProductPropertyItem { 9 | private Long id; 10 | private String name; 11 | private String code; 12 | private List value; 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/json/VariantPropertyItem.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.json; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class VariantPropertyItem { 7 | private Long id; 8 | private String name; 9 | private String code; 10 | private String value; 11 | } 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/order/OrderCancellationReasonRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.order; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | @Data 7 | public class OrderCancellationReasonRequest { 8 | private String name; 9 | @Nullable 10 | private String note; 11 | private Integer status; 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/order/OrderCancellationReasonResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.order; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | public class OrderCancellationReasonResponse { 10 | private Long id; 11 | private Instant createdAt; 12 | private Instant updatedAt; 13 | private String name; 14 | @Nullable 15 | private String note; 16 | private Integer status; 17 | } 18 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/order/OrderResourceRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.order; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | @Data 7 | public class OrderResourceRequest { 8 | private String code; 9 | private String name; 10 | private String color; 11 | @Nullable 12 | private Long customerResourceId; 13 | private Integer status; 14 | } 15 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/order/OrderResourceResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.order; 2 | 3 | import com.electro.dto.customer.CustomerResourceResponse; 4 | import lombok.Data; 5 | import org.springframework.lang.Nullable; 6 | 7 | import java.time.Instant; 8 | 9 | @Data 10 | public class OrderResourceResponse { 11 | private Long id; 12 | private Instant createdAt; 13 | private Instant updatedAt; 14 | private String code; 15 | private String name; 16 | private String color; 17 | @Nullable 18 | private CustomerResourceResponse customerResource; 19 | private Integer status; 20 | } 21 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/order/OrderVariantKeyRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.order; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class OrderVariantKeyRequest { 7 | private Long orderId; 8 | private Long variantId; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/order/OrderVariantRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.order; 2 | 3 | import lombok.Data; 4 | 5 | import java.math.BigDecimal; 6 | 7 | @Data 8 | public class OrderVariantRequest { 9 | private Long variantId; 10 | private BigDecimal price; 11 | private Integer quantity; 12 | private BigDecimal amount; 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/payment/ClientTokenResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.payment; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import lombok.Data; 5 | 6 | @Data 7 | public class ClientTokenResponse { 8 | @JsonProperty("client_token") 9 | private String clientToken; 10 | @JsonProperty("expires_in") 11 | private Long expiresIn; 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/payment/OrderIntent.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.payment; 2 | 3 | public enum OrderIntent { 4 | CAPTURE, 5 | AUTHORIZE 6 | } 7 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/payment/OrderStatus.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.payment; 2 | 3 | public enum OrderStatus { 4 | CREATED, 5 | SAVED, 6 | APPROVED, 7 | VOIDED, 8 | COMPLETED, 9 | PAYER_ACTION_REQUIRED 10 | } 11 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/payment/PaymentLandingPage.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.payment; 2 | 3 | public enum PaymentLandingPage { 4 | LOGIN, 5 | BILLING, 6 | NO_PREFERENCE 7 | } 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/payment/PaypalCheckoutResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.payment; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | 6 | @Data 7 | @AllArgsConstructor 8 | public class PaypalCheckoutResponse { 9 | private String paypalUrl; 10 | } 11 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/payment/PaypalResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.payment; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import lombok.Data; 5 | 6 | import java.util.List; 7 | 8 | @Data 9 | public class PaypalResponse { 10 | @JsonProperty("id") 11 | private String id; 12 | @JsonProperty("status") 13 | private OrderStatus status; 14 | @JsonProperty("links") 15 | private List links; 16 | 17 | @Data 18 | public static class Link { 19 | @JsonProperty("href") 20 | private String href; 21 | @JsonProperty("rel") 22 | private String rel; 23 | @JsonProperty("method") 24 | private String method; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/BrandRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class BrandRequest { 7 | private String name; 8 | private String code; 9 | private String description; 10 | private Integer status; 11 | } 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/BrandResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class BrandResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String name; 13 | private String code; 14 | private String description; 15 | private Integer status; 16 | } 17 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/CategoryRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class CategoryRequest { 7 | private String name; 8 | private String slug; 9 | private String description; 10 | private String thumbnail; 11 | private Long parentCategoryId; 12 | private Integer status; 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/CategoryResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | import java.util.List; 7 | 8 | @Data 9 | public class CategoryResponse { 10 | private Long id; 11 | private Instant createdAt; 12 | private Instant updatedAt; 13 | private String name; 14 | private String slug; 15 | private String description; 16 | private String thumbnail; 17 | private ParentCategoryResponse parentCategory; 18 | private Integer status; 19 | private List categories; 20 | } 21 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/GuaranteeRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class GuaranteeRequest { 7 | private String name; 8 | private String description; 9 | private Integer status; 10 | } 11 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/GuaranteeResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class GuaranteeResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String name; 13 | private String description; 14 | private Integer status; 15 | } 16 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/ParentCategoryResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class ParentCategoryResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String name; 13 | private String slug; 14 | private String description; 15 | private String thumbnail; 16 | private Integer status; 17 | } 18 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/PropertyRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class PropertyRequest { 7 | private String name; 8 | private String code; 9 | private String description; 10 | private Integer status; 11 | } 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/PropertyResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class PropertyResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String name; 13 | private String code; 14 | private String description; 15 | private Integer status; 16 | } 17 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/SpecificationRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class SpecificationRequest { 7 | private String name; 8 | private String code; 9 | private String description; 10 | private Integer status; 11 | } 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/SpecificationResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class SpecificationResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String name; 13 | private String code; 14 | private String description; 15 | private Integer status; 16 | } 17 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/SupplierRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import com.electro.dto.address.AddressRequest; 4 | import lombok.Data; 5 | 6 | @Data 7 | public class SupplierRequest { 8 | private String displayName; 9 | private String code; 10 | private String contactFullname; 11 | private String contactEmail; 12 | private String contactPhone; 13 | private String companyName; 14 | private String taxCode; 15 | private String email; 16 | private String phone; 17 | private String fax; 18 | private String website; 19 | private AddressRequest address; 20 | private String description; 21 | private String note; 22 | private Integer status; 23 | } 24 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/TagRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class TagRequest { 7 | private String name; 8 | private String slug; 9 | private Integer status; 10 | } 11 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/TagResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class TagResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String name; 13 | private String slug; 14 | private Integer status; 15 | } 16 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/UnitRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class UnitRequest { 7 | private String name; 8 | private Integer status; 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/UnitResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import lombok.Data; 4 | 5 | import java.time.Instant; 6 | 7 | @Data 8 | public class UnitResponse { 9 | private Long id; 10 | private Instant createdAt; 11 | private Instant updatedAt; 12 | private String name; 13 | private Integer status; 14 | } 15 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/product/VariantRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.product; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | import com.fasterxml.jackson.databind.JsonNode; 5 | import lombok.Data; 6 | import org.springframework.lang.Nullable; 7 | 8 | @Data 9 | @JsonIgnoreProperties(ignoreUnknown = true) 10 | public class VariantRequest { 11 | @Nullable 12 | private Long id; 13 | private String sku; 14 | private Double cost; 15 | private Double price; 16 | @Nullable 17 | private JsonNode properties; 18 | private Integer status; 19 | } 20 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/promotion/PromotionCheckingResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.promotion; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | 6 | @Data 7 | @AllArgsConstructor 8 | public class PromotionCheckingResponse { 9 | private boolean promotionable; 10 | } 11 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/promotion/PromotionResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.promotion; 2 | 3 | import com.electro.dto.product.ProductResponse; 4 | import lombok.Data; 5 | 6 | import java.time.Instant; 7 | import java.util.Set; 8 | 9 | @Data 10 | public class PromotionResponse { 11 | private Long id; 12 | private Instant createdAt; 13 | private Instant updatedAt; 14 | private String name; 15 | private Instant startDate; 16 | private Instant endDate; 17 | private Integer percent; 18 | private Integer status; 19 | private Set products; 20 | } 21 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/review/ReviewRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.review; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | @Data 7 | public class ReviewRequest { 8 | private Long userId; 9 | private Long productId; 10 | private Integer ratingScore; 11 | private String content; 12 | @Nullable 13 | private String reply; 14 | private Integer status; 15 | } 16 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/reward/RewardStrategyRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.reward; 2 | 3 | import lombok.Data; 4 | import org.springframework.lang.Nullable; 5 | 6 | @Data 7 | public class RewardStrategyRequest { 8 | @Nullable 9 | private String formula; 10 | @Nullable 11 | private Integer status; 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/reward/RewardStrategyResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.reward; 2 | 3 | import com.electro.entity.reward.RewardType; 4 | import lombok.Data; 5 | 6 | import java.time.Instant; 7 | 8 | @Data 9 | public class RewardStrategyResponse { 10 | private Long id; 11 | private Instant createdAt; 12 | private Instant updatedAt; 13 | private String name; 14 | private RewardType code; 15 | private String formula; 16 | private Integer status; 17 | } 18 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/statistic/StatisticResource.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.statistic; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.time.Instant; 8 | 9 | @Data 10 | @AllArgsConstructor 11 | @NoArgsConstructor 12 | public class StatisticResource { 13 | private Instant date; 14 | private Long total; 15 | } 16 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/waybill/GhnCallbackOrderRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.waybill; 2 | 3 | import lombok.Data; 4 | 5 | import java.math.BigDecimal; 6 | 7 | @Data 8 | public class GhnCallbackOrderRequest { 9 | private BigDecimal codAmount; // Tiền thu hộ 10 | private String orderCode; // Mã vận đơn GHN // * 11 | private String description; // Mô tả từ phía GHN 12 | private String reason; 13 | private String reasonCode; 14 | private Integer shopID; // * 15 | private Integer width; 16 | private Integer weight; 17 | private String status; // * 18 | } 19 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/waybill/GhnCancelOrderRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.waybill; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | 9 | // Reference: https://api.ghn.vn/home/docs/detail?id=102 10 | @Data 11 | @AllArgsConstructor 12 | public class GhnCancelOrderRequest { 13 | @JsonProperty("order_codes") 14 | private List orderCodes; 15 | } 16 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/waybill/GhnUpdateOrderRequest.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.waybill; 2 | 3 | import com.electro.entity.waybill.RequiredNote; 4 | import com.fasterxml.jackson.annotation.JsonProperty; 5 | import lombok.Data; 6 | import org.springframework.lang.Nullable; 7 | 8 | // Reference: https://api.ghn.vn/home/docs/detail?id=103 9 | @Data 10 | public class GhnUpdateOrderRequest { 11 | @JsonProperty("order_code") 12 | private String orderCode; 13 | @JsonProperty("note") 14 | @Nullable 15 | private String note; 16 | @JsonProperty("required_note") 17 | private RequiredNote requiredNote; 18 | } 19 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/dto/waybill/GhnUpdateOrderResponse.java: -------------------------------------------------------------------------------- 1 | package com.electro.dto.waybill; 2 | 3 | import com.fasterxml.jackson.annotation.JsonAlias; 4 | import lombok.Data; 5 | 6 | // Reference: https://api.ghn.vn/home/docs/detail?id=103 7 | @Data 8 | public class GhnUpdateOrderResponse { 9 | @JsonAlias("code") 10 | private Integer code; 11 | @JsonAlias("message") 12 | private String message; 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/entity/authentication/VerificationType.java: -------------------------------------------------------------------------------- 1 | package com.electro.entity.authentication; 2 | 3 | public enum VerificationType { 4 | REGISTRATION, 5 | FORGET_PASSWORD 6 | } 7 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/entity/cashbook/PaymentMethodType.java: -------------------------------------------------------------------------------- 1 | package com.electro.entity.cashbook; 2 | 3 | public enum PaymentMethodType { 4 | CASH, 5 | PAYPAL 6 | } 7 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/entity/general/NotificationType.java: -------------------------------------------------------------------------------- 1 | package com.electro.entity.general; 2 | 3 | public enum NotificationType { 4 | GENERAL, 5 | ERROR, 6 | WARNING, 7 | PREORDER, 8 | REVIEW, 9 | ORDER, 10 | CHECKOUT_PAYPAL_SUCCESS, 11 | CHECKOUT_PAYPAL_CANCEL 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/entity/reward/RewardType.java: -------------------------------------------------------------------------------- 1 | package com.electro.entity.reward; 2 | 3 | public enum RewardType { 4 | SUCCESS_ORDER, 5 | ADD_REVIEW 6 | } 7 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/entity/waybill/RequiredNote.java: -------------------------------------------------------------------------------- 1 | package com.electro.entity.waybill; 2 | 3 | public enum RequiredNote { 4 | CHOTHUHANG, 5 | CHOXEMHANGKHONGTHU, 6 | KHONGCHOXEMHANG 7 | } 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/exception/ErrorMessage.java: -------------------------------------------------------------------------------- 1 | package com.electro.exception; 2 | 3 | import lombok.Value; 4 | 5 | import java.time.Instant; 6 | 7 | @Value 8 | public class ErrorMessage { 9 | int statusCode; 10 | Instant timestamp; 11 | String message; 12 | String description; 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/exception/ExpiredTokenException.java: -------------------------------------------------------------------------------- 1 | package com.electro.exception; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.ResponseStatus; 5 | 6 | @ResponseStatus(HttpStatus.UNAUTHORIZED) 7 | public class ExpiredTokenException extends RuntimeException { 8 | 9 | public ExpiredTokenException(String message) { 10 | super(message); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/exception/FileStorageException.java: -------------------------------------------------------------------------------- 1 | package com.electro.exception; 2 | 3 | public class FileStorageException extends RuntimeException { 4 | 5 | public FileStorageException(String message) { 6 | super(message); 7 | } 8 | 9 | public FileStorageException(String message, Throwable cause) { 10 | super(message, cause); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/exception/RefreshTokenException.java: -------------------------------------------------------------------------------- 1 | package com.electro.exception; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.ResponseStatus; 5 | 6 | @ResponseStatus(HttpStatus.FORBIDDEN) 7 | public class RefreshTokenException extends RuntimeException { 8 | 9 | public RefreshTokenException(String message) { 10 | super(message); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/exception/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.electro.exception; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.ResponseStatus; 5 | 6 | @ResponseStatus(HttpStatus.NOT_FOUND) 7 | public class ResourceNotFoundException extends RuntimeException { 8 | 9 | public ResourceNotFoundException(String resourceName, String fieldName, Object fieldValue) { 10 | super(String.format("%s not found with %s: '%s'", resourceName, fieldName, fieldValue)); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/exception/StorageFileNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.electro.exception; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.ResponseStatus; 5 | 6 | @ResponseStatus(HttpStatus.NOT_FOUND) 7 | public class StorageFileNotFoundException extends RuntimeException { 8 | 9 | public StorageFileNotFoundException(String message) { 10 | super(message); 11 | } 12 | 13 | public StorageFileNotFoundException(String message, Throwable cause) { 14 | super(message, cause); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/exception/VerificationException.java: -------------------------------------------------------------------------------- 1 | package com.electro.exception; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.web.bind.annotation.ResponseStatus; 5 | 6 | @ResponseStatus(HttpStatus.UNAUTHORIZED) 7 | public class VerificationException extends RuntimeException { 8 | 9 | public VerificationException(String message) { 10 | super(message); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/GenericMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper; 2 | 3 | import org.mapstruct.MappingTarget; 4 | 5 | import java.util.List; 6 | 7 | public interface GenericMapper { 8 | 9 | E requestToEntity(I request); 10 | 11 | O entityToResponse(E entity); 12 | 13 | List requestToEntity(List requests); 14 | 15 | List entityToResponse(List entities); 16 | 17 | E partialUpdate(@MappingTarget E entity, I request); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/address/ProvinceMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.address; 2 | 3 | import com.electro.dto.address.ProvinceRequest; 4 | import com.electro.dto.address.ProvinceResponse; 5 | import com.electro.entity.address.Province; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface ProvinceMapper extends GenericMapper { 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/authentication/RoleMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.authentication; 2 | 3 | import com.electro.dto.authentication.RoleRequest; 4 | import com.electro.dto.authentication.RoleResponse; 5 | import com.electro.entity.authentication.Role; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface RoleMapper extends GenericMapper { 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/customer/CustomerGroupMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.customer; 2 | 3 | import com.electro.dto.customer.CustomerGroupRequest; 4 | import com.electro.dto.customer.CustomerGroupResponse; 5 | import com.electro.entity.customer.CustomerGroup; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface CustomerGroupMapper extends GenericMapper { 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/customer/CustomerResourceMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.customer; 2 | 3 | import com.electro.dto.customer.CustomerResourceRequest; 4 | import com.electro.dto.customer.CustomerResourceResponse; 5 | import com.electro.entity.customer.CustomerResource; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface CustomerResourceMapper extends GenericMapper { 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/customer/CustomerStatusMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.customer; 2 | 3 | import com.electro.dto.customer.CustomerStatusRequest; 4 | import com.electro.dto.customer.CustomerStatusResponse; 5 | import com.electro.entity.customer.CustomerStatus; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface CustomerStatusMapper extends GenericMapper { 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/employee/DepartmentMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.employee; 2 | 3 | import com.electro.dto.employee.DepartmentRequest; 4 | import com.electro.dto.employee.DepartmentResponse; 5 | import com.electro.entity.employee.Department; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface DepartmentMapper extends GenericMapper { 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/employee/JobLevelMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.employee; 2 | 3 | import com.electro.dto.employee.JobLevelRequest; 4 | import com.electro.dto.employee.JobLevelResponse; 5 | import com.electro.entity.employee.JobLevel; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface JobLevelMapper extends GenericMapper { 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/employee/JobTitleMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.employee; 2 | 3 | import com.electro.dto.employee.JobTitleRequest; 4 | import com.electro.dto.employee.JobTitleResponse; 5 | import com.electro.entity.employee.JobTitle; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface JobTitleMapper extends GenericMapper { 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/employee/JobTypeMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.employee; 2 | 3 | import com.electro.dto.employee.JobTypeRequest; 4 | import com.electro.dto.employee.JobTypeResponse; 5 | import com.electro.entity.employee.JobType; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface JobTypeMapper extends GenericMapper { 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/employee/OfficeMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.employee; 2 | 3 | import com.electro.dto.employee.OfficeRequest; 4 | import com.electro.dto.employee.OfficeResponse; 5 | import com.electro.entity.employee.Office; 6 | import com.electro.mapper.GenericMapper; 7 | import com.electro.mapper.address.AddressMapper; 8 | import org.mapstruct.Mapper; 9 | import org.mapstruct.ReportingPolicy; 10 | 11 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = AddressMapper.class) 12 | public interface OfficeMapper extends GenericMapper { 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/general/EventMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.general; 2 | 3 | import lombok.AllArgsConstructor; 4 | import org.apache.commons.lang3.RandomStringUtils; 5 | import org.springframework.stereotype.Component; 6 | import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; 7 | 8 | @Component 9 | @AllArgsConstructor 10 | public class EventMapper { 11 | 12 | public SseEmitter.SseEventBuilder toSseEventBuilder(String eventName, Object eventData) { 13 | return SseEmitter.event() 14 | .id(RandomStringUtils.randomAlphanumeric(12)) 15 | .name(eventName) 16 | .data(eventData); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/general/ImageMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.general; 2 | 3 | import com.electro.dto.general.ImageRequest; 4 | import com.electro.dto.general.ImageResponse; 5 | import com.electro.entity.general.Image; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface ImageMapper extends GenericMapper {} 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/inventory/DestinationMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.inventory; 2 | 3 | import com.electro.dto.inventory.DestinationRequest; 4 | import com.electro.dto.inventory.DestinationResponse; 5 | import com.electro.entity.inventory.Destination; 6 | import com.electro.mapper.GenericMapper; 7 | import com.electro.mapper.address.AddressMapper; 8 | import org.mapstruct.Mapper; 9 | import org.mapstruct.ReportingPolicy; 10 | 11 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = AddressMapper.class) 12 | public interface DestinationMapper extends GenericMapper {} 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/inventory/DocketReasonMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.inventory; 2 | 3 | import com.electro.dto.inventory.DocketReasonRequest; 4 | import com.electro.dto.inventory.DocketReasonResponse; 5 | import com.electro.entity.inventory.DocketReason; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface DocketReasonMapper extends GenericMapper {} 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/inventory/TransferMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.inventory; 2 | 3 | import com.electro.dto.inventory.TransferRequest; 4 | import com.electro.dto.inventory.TransferResponse; 5 | import com.electro.entity.inventory.Transfer; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = DocketMapper.class) 11 | public interface TransferMapper extends GenericMapper {} 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/inventory/WarehouseMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.inventory; 2 | 3 | import com.electro.dto.inventory.WarehouseRequest; 4 | import com.electro.dto.inventory.WarehouseResponse; 5 | import com.electro.entity.inventory.Warehouse; 6 | import com.electro.mapper.GenericMapper; 7 | import com.electro.mapper.address.AddressMapper; 8 | import org.mapstruct.Mapper; 9 | import org.mapstruct.ReportingPolicy; 10 | 11 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = AddressMapper.class) 12 | public interface WarehouseMapper extends GenericMapper {} 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/order/OrderCancellationReasonMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.order; 2 | 3 | import com.electro.dto.order.OrderCancellationReasonRequest; 4 | import com.electro.dto.order.OrderCancellationReasonResponse; 5 | import com.electro.entity.order.OrderCancellationReason; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface OrderCancellationReasonMapper extends GenericMapper {} 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/product/BrandMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.product; 2 | 3 | import com.electro.dto.product.BrandRequest; 4 | import com.electro.dto.product.BrandResponse; 5 | import com.electro.entity.product.Brand; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface BrandMapper extends GenericMapper {} 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/product/GuaranteeMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.product; 2 | 3 | import com.electro.dto.product.GuaranteeRequest; 4 | import com.electro.dto.product.GuaranteeResponse; 5 | import com.electro.entity.product.Guarantee; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface GuaranteeMapper extends GenericMapper { 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/product/PropertyMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.product; 2 | 3 | import com.electro.dto.product.PropertyRequest; 4 | import com.electro.dto.product.PropertyResponse; 5 | import com.electro.entity.product.Property; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface PropertyMapper extends GenericMapper { 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/product/SpecificationMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.product; 2 | 3 | import com.electro.dto.product.SpecificationRequest; 4 | import com.electro.dto.product.SpecificationResponse; 5 | import com.electro.entity.product.Specification; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface SpecificationMapper extends GenericMapper { 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/product/SupplierMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.product; 2 | 3 | import com.electro.dto.product.SupplierRequest; 4 | import com.electro.dto.product.SupplierResponse; 5 | import com.electro.entity.product.Supplier; 6 | import com.electro.mapper.GenericMapper; 7 | import com.electro.mapper.address.AddressMapper; 8 | import org.mapstruct.Mapper; 9 | import org.mapstruct.ReportingPolicy; 10 | 11 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = AddressMapper.class) 12 | public interface SupplierMapper extends GenericMapper { 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/product/TagMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.product; 2 | 3 | import com.electro.dto.product.TagRequest; 4 | import com.electro.dto.product.TagResponse; 5 | import com.electro.entity.product.Tag; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface TagMapper extends GenericMapper { 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/product/UnitMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.product; 2 | 3 | import com.electro.dto.product.UnitRequest; 4 | import com.electro.dto.product.UnitResponse; 5 | import com.electro.entity.product.Unit; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface UnitMapper extends GenericMapper { 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/mapper/product/VariantMapper.java: -------------------------------------------------------------------------------- 1 | package com.electro.mapper.product; 2 | 3 | import com.electro.dto.product.VariantRequest; 4 | import com.electro.dto.product.VariantResponse; 5 | import com.electro.entity.product.Variant; 6 | import com.electro.mapper.GenericMapper; 7 | import org.mapstruct.Mapper; 8 | import org.mapstruct.ReportingPolicy; 9 | 10 | @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) 11 | public interface VariantMapper extends GenericMapper { 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/projection/inventory/ProductInventory.java: -------------------------------------------------------------------------------- 1 | package com.electro.projection.inventory; 2 | 3 | import com.electro.entity.inventory.DocketVariant; 4 | import com.electro.entity.product.Product; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | 9 | @Data 10 | public class ProductInventory { 11 | private Product product; 12 | private List transactions; 13 | private Integer inventory; 14 | private Integer waitingForDelivery; 15 | private Integer canBeSold; 16 | private Integer areComing; 17 | } 18 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/projection/inventory/VariantInventory.java: -------------------------------------------------------------------------------- 1 | package com.electro.projection.inventory; 2 | 3 | import com.electro.entity.inventory.DocketVariant; 4 | import com.electro.entity.product.Variant; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | 9 | @Data 10 | public class VariantInventory { 11 | private Variant variant; 12 | private List transactions; 13 | private Integer inventory; 14 | private Integer waitingForDelivery; 15 | private Integer canBeSold; 16 | private Integer areComing; 17 | } 18 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/address/AddressRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.address; 2 | 3 | import com.electro.entity.address.Address; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface AddressRepository extends JpaRepository, JpaSpecificationExecutor
{ 8 | } 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/address/DistrictRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.address; 2 | 3 | import com.electro.entity.address.District; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface DistrictRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/address/ProvinceRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.address; 2 | 3 | import com.electro.entity.address.Province; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface ProvinceRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/address/WardRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.address; 2 | 3 | import com.electro.entity.address.Ward; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface WardRepository extends JpaRepository, JpaSpecificationExecutor {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/authentication/RefreshTokenRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.authentication; 2 | 3 | import com.electro.entity.authentication.RefreshToken; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | import java.util.Optional; 8 | 9 | public interface RefreshTokenRepository extends JpaRepository, JpaSpecificationExecutor { 10 | 11 | Optional findByToken(String token); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/authentication/RoleRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.authentication; 2 | 3 | import com.electro.entity.authentication.Role; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface RoleRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/authentication/VerificationRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.authentication; 2 | 3 | import com.electro.entity.authentication.Verification; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | import java.util.Optional; 8 | 9 | public interface VerificationRepository extends JpaRepository, JpaSpecificationExecutor { 10 | 11 | Optional findByUserId(Long userId); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/cart/CartRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.cart; 2 | 3 | import com.electro.entity.cart.Cart; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | import org.springframework.data.jpa.repository.Query; 7 | import org.springframework.data.repository.query.Param; 8 | 9 | import java.util.Optional; 10 | 11 | public interface CartRepository extends JpaRepository, JpaSpecificationExecutor { 12 | 13 | @Query("SELECT c FROM Cart c JOIN c.user u WHERE u.username = :username AND c.status = 1") 14 | Optional findByUsername(@Param("username") String username); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/cart/CartVariantRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.cart; 2 | 3 | import com.electro.entity.cart.CartVariant; 4 | import com.electro.entity.cart.CartVariantKey; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | public interface CartVariantRepository extends JpaRepository, 9 | JpaSpecificationExecutor {} 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/cashbook/PaymentMethodRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.cashbook; 2 | 3 | import com.electro.entity.cashbook.PaymentMethod; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | import java.util.List; 8 | 9 | public interface PaymentMethodRepository extends JpaRepository, JpaSpecificationExecutor { 10 | 11 | List findAllByStatus(Integer status); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/chat/MessageRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.chat; 2 | 3 | import com.electro.entity.chat.Message; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.jpa.repository.JpaRepository; 7 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 8 | 9 | public interface MessageRepository extends JpaRepository, JpaSpecificationExecutor { 10 | 11 | Page findByRoomId(Long roomId, Pageable pageable); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/chat/RoomRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.chat; 2 | 3 | import com.electro.entity.chat.Room; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | import java.util.Optional; 8 | 9 | public interface RoomRepository extends JpaRepository, JpaSpecificationExecutor { 10 | 11 | Optional findByUserUsername(String username); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/customer/CustomerGroupRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.customer; 2 | 3 | import com.electro.entity.customer.CustomerGroup; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface CustomerGroupRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/customer/CustomerRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.customer; 2 | 3 | import com.electro.entity.customer.Customer; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | import org.springframework.data.jpa.repository.Query; 7 | 8 | public interface CustomerRepository extends JpaRepository, JpaSpecificationExecutor { 9 | 10 | @Query("SELECT COUNT(c.id) FROM Customer c") 11 | int countByCustomerId(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/customer/CustomerResourceRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.customer; 2 | 3 | import com.electro.entity.customer.CustomerResource; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface CustomerResourceRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/customer/CustomerStatusRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.customer; 2 | 3 | import com.electro.entity.customer.CustomerStatus; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface CustomerStatusRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/employee/DepartmentRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.employee; 2 | 3 | import com.electro.entity.employee.Department; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface DepartmentRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/employee/EmployeeRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.employee; 2 | 3 | import com.electro.entity.employee.Employee; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface EmployeeRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/employee/JobLevelRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.employee; 2 | 3 | import com.electro.entity.employee.JobLevel; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface JobLevelRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/employee/JobTitleRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.employee; 2 | 3 | import com.electro.entity.employee.JobTitle; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface JobTitleRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/employee/JobTypeRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.employee; 2 | 3 | import com.electro.entity.employee.JobType; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface JobTypeRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/employee/OfficeRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.employee; 2 | 3 | import com.electro.entity.employee.Office; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface OfficeRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/general/EmitterRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.general; 2 | 3 | import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; 4 | 5 | import java.util.Optional; 6 | 7 | public interface EmitterRepository { 8 | 9 | void addOrReplaceEmitter(String uuid, String uniqueKey, SseEmitter emitter); 10 | 11 | void remove(String uniqueKey); 12 | 13 | Optional getByUniqueKey(String uniqueKey); 14 | 15 | Optional getByUuid(String uuid); 16 | 17 | String getUuidByUniqueKey(String uniqueKey); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/general/ImageRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.general; 2 | 3 | import com.electro.entity.general.Image; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface ImageRepository extends JpaRepository, JpaSpecificationExecutor {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/inventory/CountRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.inventory; 2 | 3 | import com.electro.entity.inventory.Count; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface CountRepository extends JpaRepository, JpaSpecificationExecutor {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/inventory/CountVariantRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.inventory; 2 | 3 | import com.electro.entity.inventory.CountVariant; 4 | import com.electro.entity.inventory.CountVariantKey; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | public interface CountVariantRepository extends JpaRepository, 9 | JpaSpecificationExecutor {} 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/inventory/DestinationRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.inventory; 2 | 3 | import com.electro.entity.inventory.Destination; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface DestinationRepository extends JpaRepository, JpaSpecificationExecutor {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/inventory/DocketReasonRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.inventory; 2 | 3 | import com.electro.entity.inventory.DocketReason; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface DocketReasonRepository extends JpaRepository, JpaSpecificationExecutor {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/inventory/DocketRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.inventory; 2 | 3 | import com.electro.entity.inventory.Docket; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface DocketRepository extends JpaRepository, JpaSpecificationExecutor {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/inventory/ProductInventoryLimitRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.inventory; 2 | 3 | import com.electro.entity.inventory.ProductInventoryLimit; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface ProductInventoryLimitRepository extends JpaRepository, 8 | JpaSpecificationExecutor {} 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/inventory/PurchaseOrderRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.inventory; 2 | 3 | import com.electro.entity.inventory.PurchaseOrder; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface PurchaseOrderRepository extends JpaRepository, JpaSpecificationExecutor {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/inventory/PurchaseOrderVariantRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.inventory; 2 | 3 | import com.electro.entity.inventory.PurchaseOrderVariant; 4 | import com.electro.entity.inventory.PurchaseOrderVariantKey; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | public interface PurchaseOrderVariantRepository extends JpaRepository, 9 | JpaSpecificationExecutor {} 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/inventory/StorageLocationRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.inventory; 2 | 3 | import com.electro.entity.inventory.StorageLocation; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface StorageLocationRepository extends JpaRepository, JpaSpecificationExecutor {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/inventory/TransferRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.inventory; 2 | 3 | import com.electro.entity.inventory.Transfer; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface TransferRepository extends JpaRepository, JpaSpecificationExecutor {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/inventory/VariantInventoryLimitRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.inventory; 2 | 3 | import com.electro.entity.inventory.VariantInventoryLimit; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface VariantInventoryLimitRepository extends JpaRepository, 8 | JpaSpecificationExecutor {} 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/inventory/WarehouseRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.inventory; 2 | 3 | import com.electro.entity.inventory.Warehouse; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface WarehouseRepository extends JpaRepository, JpaSpecificationExecutor {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/order/OrderCancellationReasonRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.order; 2 | 3 | import com.electro.entity.order.OrderCancellationReason; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface OrderCancellationReasonRepository extends JpaRepository, 8 | JpaSpecificationExecutor {} 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/order/OrderResourceRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.order; 2 | 3 | import com.electro.entity.order.OrderResource; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface OrderResourceRepository extends JpaRepository, JpaSpecificationExecutor {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/order/OrderVariantRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.order; 2 | 3 | import com.electro.entity.order.OrderVariant; 4 | import com.electro.entity.order.OrderVariantKey; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | public interface OrderVariantRepository extends JpaRepository, 9 | JpaSpecificationExecutor {} 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/product/CategoryRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.product; 2 | 3 | import com.electro.entity.product.Category; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | import java.util.List; 8 | import java.util.Optional; 9 | 10 | public interface CategoryRepository extends JpaRepository, JpaSpecificationExecutor { 11 | 12 | List findByParentCategoryIsNull(); 13 | 14 | Optional findBySlug(String slug); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/product/GuaranteeRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.product; 2 | 3 | import com.electro.entity.product.Guarantee; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface GuaranteeRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/product/PropertyRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.product; 2 | 3 | import com.electro.entity.product.Property; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface PropertyRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/product/SpecificationRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.product; 2 | 3 | import com.electro.entity.product.Specification; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface SpecificationRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/product/SupplierRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.product; 2 | 3 | import com.electro.entity.product.Supplier; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | import org.springframework.data.jpa.repository.Query; 7 | 8 | public interface SupplierRepository extends JpaRepository, JpaSpecificationExecutor { 9 | 10 | @Query("SELECT COUNT(s.id) FROM Supplier s") 11 | int countBySupplierId(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/product/TagRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.product; 2 | 3 | import com.electro.entity.product.Tag; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface TagRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/product/UnitRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.product; 2 | 3 | import com.electro.entity.product.Unit; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface UnitRepository extends JpaRepository, JpaSpecificationExecutor { 8 | } -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/reward/RewardStrategyRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.reward; 2 | 3 | import com.electro.entity.reward.RewardStrategy; 4 | import com.electro.entity.reward.RewardType; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | import java.util.Optional; 9 | 10 | public interface RewardStrategyRepository extends JpaRepository, JpaSpecificationExecutor { 11 | 12 | Optional findByCodeAndStatus(RewardType code, Integer status); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/repository/waybill/WaybillLogRepository.java: -------------------------------------------------------------------------------- 1 | package com.electro.repository.waybill; 2 | 3 | import com.electro.entity.waybill.WaybillLog; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | 7 | public interface WaybillLogRepository extends JpaRepository, JpaSpecificationExecutor {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/address/ProvinceService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.address; 2 | 3 | import com.electro.dto.address.ProvinceRequest; 4 | import com.electro.dto.address.ProvinceResponse; 5 | import com.electro.service.CrudService; 6 | 7 | public interface ProvinceService extends CrudService {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/auth/VerificationService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.auth; 2 | 3 | import com.electro.dto.authentication.RegistrationRequest; 4 | import com.electro.dto.authentication.ResetPasswordRequest; 5 | import com.electro.dto.authentication.UserRequest; 6 | 7 | public interface VerificationService { 8 | 9 | Long generateTokenVerify(UserRequest userRequest); 10 | 11 | void resendRegistrationToken(Long userId); 12 | 13 | void confirmRegistration(RegistrationRequest registration); 14 | 15 | void changeRegistrationEmail(Long userId, String emailUpdate); 16 | 17 | void forgetPassword(String email); 18 | 19 | void resetPassword(ResetPasswordRequest resetPasswordRequest); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/authetication/RefreshTokenService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.authetication; 2 | 3 | import com.electro.entity.authentication.RefreshToken; 4 | import org.springframework.security.core.Authentication; 5 | 6 | import java.util.Optional; 7 | 8 | public interface RefreshTokenService { 9 | 10 | Optional findByToken(String token); 11 | 12 | RefreshToken createRefreshToken(Authentication authentication); 13 | 14 | RefreshToken verifyExpiration(RefreshToken refreshToken); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/chat/MessageService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.chat; 2 | 3 | import com.electro.dto.chat.MessageRequest; 4 | import com.electro.dto.chat.MessageResponse; 5 | import com.electro.service.CrudService; 6 | 7 | public interface MessageService extends CrudService {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/email/EmailSenderService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.email; 2 | 3 | import java.util.Map; 4 | 5 | public interface EmailSenderService { 6 | 7 | void sendVerificationToken(String toEmail, Map attributes); 8 | 9 | void sendForgetPasswordToken(String toEmail, Map attributes); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/general/ImageService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.general; 2 | 3 | import com.electro.dto.general.UploadedImageResponse; 4 | import org.springframework.core.io.Resource; 5 | import org.springframework.web.multipart.MultipartFile; 6 | 7 | public interface ImageService { 8 | 9 | UploadedImageResponse store(MultipartFile image); 10 | 11 | Resource load(String imageName); 12 | 13 | void delete(String imageName); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/general/NotificationService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.general; 2 | 3 | import com.electro.dto.general.NotificationResponse; 4 | 5 | public interface NotificationService { 6 | 7 | void pushNotification(String uniqueKey, NotificationResponse notification); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/inventory/CountVariantService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.inventory; 2 | 3 | import com.electro.dto.inventory.CountVariantRequest; 4 | import com.electro.dto.inventory.CountVariantResponse; 5 | import com.electro.entity.inventory.CountVariantKey; 6 | import com.electro.service.CrudService; 7 | 8 | public interface CountVariantService extends CrudService {} 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/inventory/DocketService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.inventory; 2 | 3 | import com.electro.dto.inventory.DocketRequest; 4 | import com.electro.dto.inventory.DocketResponse; 5 | import com.electro.service.CrudService; 6 | 7 | public interface DocketService extends CrudService {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/inventory/DocketVariantService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.inventory; 2 | 3 | import com.electro.dto.inventory.DocketVariantRequest; 4 | import com.electro.dto.inventory.DocketVariantResponse; 5 | import com.electro.entity.inventory.DocketVariantKey; 6 | import com.electro.service.CrudService; 7 | 8 | public interface DocketVariantService extends CrudService {} 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/inventory/OrderVariantService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.inventory; 2 | 3 | import com.electro.dto.order.OrderVariantRequest; 4 | import com.electro.dto.order.OrderVariantResponse; 5 | import com.electro.entity.order.OrderVariantKey; 6 | import com.electro.service.CrudService; 7 | 8 | public interface OrderVariantService extends CrudService {} 9 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/inventory/PurchaseOrderVariantService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.inventory; 2 | 3 | import com.electro.dto.inventory.PurchaseOrderVariantRequest; 4 | import com.electro.dto.inventory.PurchaseOrderVariantResponse; 5 | import com.electro.entity.inventory.PurchaseOrderVariantKey; 6 | import com.electro.service.CrudService; 7 | 8 | public interface PurchaseOrderVariantService extends CrudService {} 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/order/OrderService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.order; 2 | 3 | import com.electro.dto.client.ClientConfirmedOrderResponse; 4 | import com.electro.dto.client.ClientSimpleOrderRequest; 5 | 6 | public interface OrderService { 7 | 8 | void cancelOrder(String code); 9 | 10 | ClientConfirmedOrderResponse createClientOrder(ClientSimpleOrderRequest request); 11 | 12 | void captureTransactionPaypal(String paypalOrderId, String payerId); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/promotion/PromotionService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.promotion; 2 | 3 | import com.electro.dto.promotion.PromotionRequest; 4 | import com.electro.dto.promotion.PromotionResponse; 5 | import com.electro.service.CrudService; 6 | 7 | import java.time.Instant; 8 | 9 | public interface PromotionService extends CrudService { 10 | 11 | boolean checkCanCreatePromotionForProduct(Long productId, Instant startDate, Instant endDate); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/review/ReviewService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.review; 2 | 3 | import com.electro.dto.review.ReviewRequest; 4 | import com.electro.dto.review.ReviewResponse; 5 | import com.electro.service.CrudService; 6 | 7 | public interface ReviewService extends CrudService {} 8 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/statistic/StatisticService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.statistic; 2 | 3 | import com.electro.dto.statistic.StatisticResponse; 4 | 5 | public interface StatisticService { 6 | 7 | StatisticResponse getStatistic(); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /electro-server/src/main/java/com/electro/service/waybill/WaybillService.java: -------------------------------------------------------------------------------- 1 | package com.electro.service.waybill; 2 | 3 | import com.electro.dto.waybill.GhnCallbackOrderRequest; 4 | import com.electro.dto.waybill.WaybillRequest; 5 | import com.electro.dto.waybill.WaybillResponse; 6 | import com.electro.service.CrudService; 7 | 8 | public interface WaybillService extends CrudService { 9 | 10 | void callbackStatusWaybillFromGHN(GhnCallbackOrderRequest ghnCallbackOrderRequest); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /electro-server/src/main/resources/application-ci.properties: -------------------------------------------------------------------------------- 1 | # Database Config 2 | spring.datasource.url = jdbc:mysql://electro-database:3306/electro 3 | -------------------------------------------------------------------------------- /electro-server/src/main/resources/application-dev.properties: -------------------------------------------------------------------------------- 1 | # Database Config 2 | spring.datasource.url = jdbc:mysql://localhost:3306/electro?sessionVariables=sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION' 3 | -------------------------------------------------------------------------------- /electro-server/src/test/java/com/electro/ElectroApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.electro; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class ElectroApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | --------------------------------------------------------------------------------