kima2/src/core/article.h
2022-07-07 15:21:46 +02:00

43 lines
880 B
C++

#ifndef ARTICLE_H
#define ARTICLE_H
#include "entityuuid.h"
#include <memory>
#include <string>
class Seller;
class Sale;
class Article : public EntityUuid
{
public:
Article() = default;
Article(int price);
Article(const Article &) = delete;
virtual ~Article() = default;
void setArticleNo(int articleNo);
void setPrice(int price);
void setDescription(const std::string &description);
bool isSold();
void setSale(Sale *salePtr);
void setSeller(Seller *sellerPtr);
int getArticleNo() const;
std::string getCompleteArticleNo() const;
std::string getDescription();
Seller *getSeller();
Sale *getSale();
int getPrice() const;
std::string getPriceAsString() const;
private:
Seller *m_sellerPtr{};
Sale *m_salePtr{};
int m_articleNo{};
int m_price{};
std::string m_description{};
};
#endif