36 lines
954 B
C++
36 lines
954 B
C++
/*
|
|
File: InventoryItem.h
|
|
Description: Declares the InventoryItem class which represents parts in the Vehicle Service Management System.
|
|
Each item has a unique ID, part name, quantity, price, and status.
|
|
Author: Trenser
|
|
Date: 19-May-2026
|
|
*/
|
|
|
|
|
|
#pragma once
|
|
#include <string>
|
|
#include "Enums.h"
|
|
|
|
class InventoryItem
|
|
{
|
|
private:
|
|
static int m_uid;
|
|
std::string m_id;
|
|
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);
|
|
const std::string& getId() const;
|
|
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);
|
|
}; |