53713f444b
- 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
31 lines
1010 B
C++
31 lines
1010 B
C++
#pragma once
|
|
#include <string>
|
|
#include "Map.h"
|
|
#include "NotificationManagementService.h"
|
|
#include "Enums.h"
|
|
#include "DataStore.h"
|
|
|
|
class ServiceBooking;
|
|
class Invoice;
|
|
|
|
class PaymentManagementService : public NotificationManagementService
|
|
{
|
|
private:
|
|
DataStore& m_dataStore;
|
|
static util::Map<std::string, User*> m_observers;
|
|
util::Vector<std::string> getObserverIDs() override;
|
|
public:
|
|
PaymentManagementService() : m_dataStore(DataStore::getInstance()) {}
|
|
void generateInvoice(ServiceBooking* booking);
|
|
util::Map<std::string, Invoice*> getInvoices(const std::string& customerID);
|
|
void completePayment(const std::string& invoiceID, util::PaymentMode paymentMode);
|
|
void sendPaymentReminders();
|
|
void sendNotification(User* user, const std::string& title, const std::string& message) override;
|
|
void attach(User* user) override;
|
|
void detach(User* user) override;
|
|
void loadInvoices();
|
|
void saveInvoices();
|
|
void loadObservers();
|
|
void saveObservers();
|
|
};
|