e8eb99c742
Changes: - Added SharedMemory module for file-backed memory-mapped storage - Added MappingInfo, FileHeader, RecordState and TrackedRecord infrastructure - Added serialized record structures for all domain models - Replaced CSV-based serialization with binary struct serialization - Updated model serialize/deserialize implementations to use serialized records - Added DataStore initialization and shutdown lifecycle management - Added datastore mutex synchronization for multi-process access - Added shared-memory mapping configuration for all datastore entities - Added generic loadRecords and saveRecords template infrastructure - Added automatic datastore directory creation and .dat file storage - Updated configuration to use binary datastore files and initial capacities - Added enum underlying types for serialization compatibility - Added password masking support for login, registration and password change flows - Added Visual Studio project configuration for shared-memory components - Prepared datastore for multi-process shared-memory persistence
76 lines
2.4 KiB
C++
76 lines
2.4 KiB
C++
/*
|
|
File: JobCard.h
|
|
Description: Header file declaring the JobCard class, which represents
|
|
a service job card containing booking, service, technician,
|
|
and status details.
|
|
Author: Trenser
|
|
Date:19-May-2026
|
|
*/
|
|
|
|
#pragma once
|
|
#include <string>
|
|
#include "Enums.h"
|
|
#include "Timestamp.h"
|
|
|
|
class ServiceBooking;
|
|
class Service;
|
|
class User;
|
|
struct SerializedJobCard;
|
|
|
|
class JobCard
|
|
{
|
|
private:
|
|
static int m_uid;
|
|
std::string m_id;
|
|
std::string m_bookingId;
|
|
ServiceBooking* m_booking;
|
|
Service* m_service;
|
|
std::string m_serviceId;
|
|
std::string m_technicianId;
|
|
User* m_technician;
|
|
util::Timestamp m_assignedDate;
|
|
util::ServiceJobStatus m_status;
|
|
util::Timestamp m_completionDate;
|
|
public:
|
|
JobCard();
|
|
JobCard(const std::string& bookingId,
|
|
ServiceBooking* booking,
|
|
Service* service,
|
|
const std::string& serviceId,
|
|
const std::string& technicianId,
|
|
User* technician,
|
|
const util::Timestamp& assignedDate,
|
|
util::ServiceJobStatus status,
|
|
const util::Timestamp& completionDate
|
|
);
|
|
JobCard(const std::string& id,
|
|
const std::string& bookingId,
|
|
const std::string& serviceId,
|
|
const std::string& technicianId,
|
|
const util::Timestamp& assignedDate,
|
|
util::ServiceJobStatus status,
|
|
const util::Timestamp& completionDate
|
|
);
|
|
const std::string& getId() const;
|
|
const std::string& getBookingId() const;
|
|
ServiceBooking* getBooking() const;
|
|
Service* getService() const;
|
|
const std::string& getServiceId() const;
|
|
const std::string& getTechnicianId() const;
|
|
User* getTechnician() const;
|
|
const util::Timestamp& getAssignedDate() const;
|
|
util::ServiceJobStatus getStatus() const;
|
|
const util::Timestamp& getCompletionDate() const;
|
|
void setId(const std::string& id);
|
|
void setBookingId(const std::string& bookingId);
|
|
void setBooking(ServiceBooking* booking);
|
|
void setService(Service* service);
|
|
void setServiceId(const std::string& serviceId);
|
|
void setTechnicianId(const std::string& technicianId);
|
|
void setTechnician(User* technician);
|
|
void setAssignedDate(const util::Timestamp& assignedDate);
|
|
void setStatus(util::ServiceJobStatus status);
|
|
void setCompletionDate(const util::Timestamp& completionDate);
|
|
SerializedJobCard serialize() const;
|
|
static JobCard* deserialize(const SerializedJobCard&);
|
|
}; |