2018-07-09 16:06:27 +02:00
|
|
|
#ifndef ARTICLE_H
|
|
|
|
#define ARTICLE_H
|
|
|
|
|
|
|
|
#include "entity.h"
|
2018-07-11 12:52:57 +02:00
|
|
|
#include "sale.h"
|
2018-07-11 13:25:39 +02:00
|
|
|
#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;
|
|
|
|
|
|
|
|
class Article : public Entity
|
|
|
|
{
|
2018-07-11 13:25:39 +02:00
|
|
|
public:
|
2018-07-09 16:06:27 +02:00
|
|
|
Article();
|
|
|
|
Article(std::shared_ptr<Seller> sellerPtr);
|
|
|
|
void setArticleNo(int articleNo);
|
|
|
|
void setPrice(int price);
|
|
|
|
void setDescription(const std::string& description);
|
2018-07-11 13:25:39 +02:00
|
|
|
std::string getDescription();
|
2018-07-11 12:52:57 +02:00
|
|
|
bool isSold();
|
2018-07-11 13:25:39 +02:00
|
|
|
void setSale(std::shared_ptr<Sale> salePtr);
|
2018-07-11 12:52:57 +02:00
|
|
|
void setSeller(std::shared_ptr<Seller> sellerPtr);
|
2018-07-11 13:25:39 +02:00
|
|
|
|
|
|
|
private:
|
2018-07-11 12:52:57 +02:00
|
|
|
std::shared_ptr<Seller> sellerPtr_{};
|
|
|
|
std::shared_ptr<Sale> salePtr_{};
|
|
|
|
int articleNo_{};
|
|
|
|
int price_{};
|
|
|
|
std::string description_{};
|
2018-07-09 16:06:27 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|