Implement serialization/deserialization and persistent storage across services

- Add serialize/deserialize support for core models
- Add file-based load/save functions in management services
- Introduce FileManager, Config, Utility and helper utilities
- Persist observer IDs for notification services
- Resolve object relationships during load (services, bookings, invoices, job cards)
- Add controller-level loadSystemData/saveSystemData
- Load data at app startup and save on shutdown
This commit is contained in:
2026-05-22 12:13:17 +05:30
parent 56c5c2dc70
commit 53713f444b
38 changed files with 1573 additions and 35 deletions
@@ -2,6 +2,10 @@
#include "Map.h"
#include <string>
#include "Enums.h"
#include "InventoryManagementService.h"
#include "UserManagementService.h"
#include "ServiceManagementService.h"
#include "PaymentManagementService.h"
class Service;
class ComboPackage;
@@ -14,6 +18,11 @@ class Notification;
class Controller
{
private:
UserManagementService m_userManagementService;
InventoryManagementService m_inventoryManagementService;
ServiceManagementService m_serviceManagementService;
PaymentManagementService m_paymentManagementService;
public:
bool login(const std::string& username, const std::string& password);
void logout();
@@ -47,5 +56,7 @@ public:
util::Vector<const Notification*> getNotifications();
void deleteNotification(const std::string& notificationID);
void configureNotifications(const std::string& userID, bool paymentNotifications, bool serviceNotifications);
void loadSystemData();
void saveSystemData();
void runSystemChecks();
};