84 lines
2.9 KiB
C++
84 lines
2.9 KiB
C++
/*
|
|
File: ServiceBooking.h
|
|
Description: Header file declaring the ServiceBooking class, which represents
|
|
a booking of services by a customer, including vehicle details,
|
|
assigned technician, and discount information.
|
|
Author: Trenser
|
|
Date:19-May-2026
|
|
*/
|
|
#pragma once
|
|
#include <string>
|
|
#include "Map.h"
|
|
#include "Vector.h"
|
|
#include "Enums.h"
|
|
|
|
class Service;
|
|
class User;
|
|
|
|
class ServiceBooking
|
|
{
|
|
private:
|
|
static int m_uid;
|
|
std::string m_id;
|
|
util::ServiceJobStatus m_status;
|
|
util::Vector<std::string> m_serviceIDs;
|
|
util::Map<std::string, Service*> m_services;
|
|
std::string m_customerId;
|
|
User* m_customer;
|
|
std::string m_vehicleNumber;
|
|
std::string m_vehicleBrand;
|
|
std::string m_vehicleModel;
|
|
std::string m_assignedTechnicianId;
|
|
User* m_assignedTechnician;
|
|
double m_discountPercentage;
|
|
public:
|
|
ServiceBooking();
|
|
ServiceBooking(
|
|
util::ServiceJobStatus status,
|
|
const util::Map<std::string,
|
|
Service*>& services,
|
|
const std::string& customerId,
|
|
User* customer,
|
|
const std::string& vehicleNumber,
|
|
const std::string& vehicleBrand,
|
|
const std::string& vehicleModel,
|
|
double discountPercentage
|
|
);
|
|
ServiceBooking(
|
|
const std::string& id,
|
|
util::ServiceJobStatus status,
|
|
const util::Vector<std::string>& serviceIDs,
|
|
const std::string& customerId,
|
|
const std::string& vehicleNumber,
|
|
const std::string& vehicleBrand,
|
|
const std::string& vehicleModel,
|
|
const std::string& assignedTechnicianId,
|
|
double discountPercentage
|
|
);
|
|
const std::string& getId() const;
|
|
util::ServiceJobStatus getStatus() const;
|
|
const util::Vector<std::string>& getServiceIDs() const;
|
|
const util::Map<std::string, Service*>& getServices() const;
|
|
const std::string& getCustomerId() const;
|
|
User* getCustomer() const;
|
|
const std::string& getVehicleNumber() const;
|
|
const std::string& getVehicleBrand() const;
|
|
const std::string& getVehicleModel() const;
|
|
const std::string& getAssignedTechnicianId() const;
|
|
User* getAssignedTechnician() const;
|
|
double getDiscountPercentage() const;
|
|
void setId(const std::string& id);
|
|
void setStatus(const util::ServiceJobStatus& status);
|
|
void setServices(const util::Map<std::string, Service*>& services);
|
|
void setCustomerId(const std::string& customerId);
|
|
void setCustomer(User* customer);
|
|
void setVehicleNumber(const std::string& vehicleNumber);
|
|
void setVehicleBrand(const std::string& vehicleBrand);
|
|
void setVehicleModel(const std::string& vehicleModel);
|
|
void setAssignedTechnicianId(const std::string& assignedTechnicianId);
|
|
void setAssignedTechnician(User* assignedTechnician);
|
|
void setDiscountPercentage(double discountPercentage);
|
|
std::string serialize() const;
|
|
static ServiceBooking* deserialize(const std::string&);
|
|
static std::string getHeaders();
|
|
}; |