Add state tracking for models and menu loop setup

<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>
This commit is contained in:
2026-05-19 16:21:56 +05:30
parent dd834ded44
commit d10cc91c40
12 changed files with 148 additions and 4 deletions
@@ -1,5 +1,6 @@
#pragma once
#include <string>
#include "Enums.h"
class InventoryItem
{
@@ -9,6 +10,7 @@ private:
std::string m_partName;
int m_quantity;
double m_price;
util::State m_status;
public:
InventoryItem();
InventoryItem(const std::string& partName, int quantity, double price);
@@ -16,8 +18,10 @@ public:
const std::string& getPartName() const;
int getQuantity() const;
double getPrice() const;
util::State getState() const;
void setId(const std::string& id);
void setPartName(const std::string& partName);
void setQuantity(int quantity);
void setPrice(double price);
void setState(util::State status);
};