56c5c2dc70
- Removed observer map from Subject base class - Removed notify() from Subject interface - Made NotificationManagementService abstract with pure virtual methods - Added static observer maps to notification service implementations - Added attach() and detach() overrides in inventory, payment, and service management services - Added update() override in User model for observer pattern support - Updated notification method declarations with override specifiers
26 lines
851 B
C++
26 lines
851 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;
|
|
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;
|
|
};
|