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;
|
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-09 16:06:27 +02:00
|
|
|
Article();
|
2018-07-12 14:37:56 +02:00
|
|
|
//Article(std::shared_ptr<Seller> sellerPtr);
|
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(std::shared_ptr<Seller> sellerPtr);
|
|
|
|
void setSeller(Seller* sellerPtr);
|
2018-07-11 13:25:39 +02:00
|
|
|
|
2018-07-13 13:04:30 +02:00
|
|
|
int getArticleNo();
|
2018-07-12 12:06:55 +02:00
|
|
|
std::string getDescription();
|
|
|
|
Seller* getSeller();
|
2018-07-12 13:36:13 +02:00
|
|
|
int getPrice();
|
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
|