feat: Implement loyalty and wholesale services with models, routes, and validation
CI / test (push) Successful in 10m23s
CI / test (push) Successful in 10m23s
- Added models for loyalty points allocation, redemption, rewards, tiers, tier history, and referrals. - Created business credit ledger entries, settlements, and settlement items models. - Developed services for loyalty operations including account management, point allocation, redemption, and referral handling. - Implemented wholesale credit management services for transactions and settlements. - Established routes for loyalty and wholesale admin and customer operations with appropriate middleware for authentication and permission checks. - Introduced validation schemas for loyalty and wholesale operations. - Set up cron jobs for loyalty reconciliation tasks such as birthday rewards and point expirations. - Created migration scripts to set up the database schema for loyalty and wholesale features. - Added unit tests for validation and policy enforcement in loyalty and wholesale services.
This commit is contained in:
@@ -39,6 +39,10 @@ const commerceAdminRoutes = require("./commerce/admin.routes");
|
||||
const logisticsAdminRoutes = require("./logistics/admin.routes");
|
||||
const logisticsRiderRoutes = require("./logistics/rider.routes");
|
||||
const logisticsTrackingRoutes = require("./logistics/tracking.routes");
|
||||
const loyaltyCustomerRoutes = require("./loyalty/customer.routes");
|
||||
const loyaltyAdminRoutes = require("./loyalty/admin.routes");
|
||||
const wholesaleCustomerRoutes = require("./wholesale/customer.routes");
|
||||
const wholesaleAdminRoutes = require("./wholesale/admin.routes");
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
@@ -70,5 +74,9 @@ router.use("/admin", commerceAdminRoutes);
|
||||
router.use("/admin", logisticsAdminRoutes);
|
||||
router.use("/rider", logisticsRiderRoutes);
|
||||
router.use("/", logisticsTrackingRoutes);
|
||||
router.use("/", loyaltyCustomerRoutes);
|
||||
router.use("/admin", loyaltyAdminRoutes);
|
||||
router.use("/", wholesaleCustomerRoutes);
|
||||
router.use("/admin", wholesaleAdminRoutes);
|
||||
|
||||
module.exports = router;
|
||||
|
||||
Reference in New Issue
Block a user