d10cc91c40
<Changes>
1. Added State enum with ACTIVE and INACTIVE values in Enums.h.
2. Added state member, getter, and setter in User, Service, InventoryItem, and ComboPackage models.
3. Updated constructors to initialize model objects with ACTIVE state by default.
4. Added state string conversion helper functions in Enums.h.
5. Added default return values in Controller getter methods to complete stub implementations.
6. Added basic menu loop implementation in CustomerMenu and TechnicianMenu for handling user input.
</Changes>
30 lines
951 B
C++
30 lines
951 B
C++
#pragma once
|
|
#include <string>
|
|
#include "Map.h"
|
|
#include "Enums.h"
|
|
|
|
class InventoryItem;
|
|
|
|
class Service
|
|
{
|
|
private:
|
|
static int m_uid;
|
|
std::string m_id;
|
|
std::string m_name;
|
|
util::Map<std::string, InventoryItem*> m_requiredInventoryItems;
|
|
double m_laborCost;
|
|
util::State m_status;
|
|
public:
|
|
Service();
|
|
Service(const std::string& name, const util::Map<std::string, InventoryItem*>& requiredInventoryItems, double laborCost);
|
|
const std::string& getId() const;
|
|
const std::string& getName() const;
|
|
const util::Map<std::string, InventoryItem*>& getRequiredInventoryItems() const;
|
|
double getLaborCost() const;
|
|
util::State getState() const;
|
|
void setId(const std::string& id);
|
|
void setName(const std::string& name);
|
|
void setRequiredInventoryItems(const util::Map<std::string, InventoryItem*>& requiredInventoryItems);
|
|
void setLaborCost(double laborCost);
|
|
void setState(util::State status);
|
|
}; |