2018-07-09 16:06:27 +02:00
|
|
|
#ifndef ARTICLE_H
|
|
|
|
#define ARTICLE_H
|
|
|
|
|
|
|
|
#include "entity.h"
|
2018-07-20 13:07:48 +02:00
|
|
|
//#include "sale.h"
|
|
|
|
//#include "seller.h"
|
2018-07-09 16:06:27 +02:00
|
|
|
|
|
|
|
#include <memory>
|
2018-07-11 13:25:39 +02:00
|
|
|
#include <string>
|
2018-07-09 16:06:27 +02:00
|
|
|
|
|
|
|
class Seller;
|
2018-07-12 13:36:13 +02:00
|
|
|
class Sale;
|
2018-07-09 16:06:27 +02:00
|
|
|
|
|
|
|
class Article : public Entity
|
|
|
|
{
|
2018-07-11 13:25:39 +02:00
|
|
|
public:
|
2018-07-20 11:52:26 +02:00
|
|
|
Article() = default;
|
2018-07-21 19:24:56 +02:00
|
|
|
Article(int price);
|
2018-07-20 11:52:26 +02:00
|
|
|
//virtual ~Article() = default;
|
|
|
|
|
2018-07-09 16:06:27 +02:00
|
|
|
void setArticleNo(int articleNo);
|
|
|
|
void setPrice(int price);
|
|
|
|
void setDescription(const std::string& description);
|
2018-07-11 12:52:57 +02:00
|
|
|
bool isSold();
|
2018-07-12 14:37:56 +02:00
|
|
|
void setSale(Sale* salePtr);
|
|
|
|
void setSeller(Seller* sellerPtr);
|
2018-07-11 13:25:39 +02:00
|
|
|
|
2018-07-30 14:43:02 +02:00
|
|
|
int getArticleNo() const;
|
|
|
|
std::string getCompleteArticleNo() const;
|
2018-07-12 12:06:55 +02:00
|
|
|
std::string getDescription();
|
|
|
|
Seller* getSeller();
|
2018-07-25 16:04:45 +02:00
|
|
|
Sale* getSale();
|
2018-07-20 11:52:26 +02:00
|
|
|
int getPrice() const;
|
2018-07-23 14:25:18 +02:00
|
|
|
std::string getPriceAsString() const;
|
2018-07-12 12:06:55 +02:00
|
|
|
|
2018-07-11 13:25:39 +02:00
|
|
|
private:
|
2018-07-12 14:37:56 +02:00
|
|
|
Seller* sellerPtr_{};
|
|
|
|
Sale* salePtr_{};
|
2018-07-11 12:52:57 +02:00
|
|
|
int articleNo_{};
|
|
|
|
int price_{};
|
|
|
|
std::string description_{};
|
2018-07-09 16:06:27 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|