kima2/src/core/article.h

41 lines
760 B
C
Raw Normal View History

2018-07-09 16:06:27 +02:00
#ifndef ARTICLE_H
#define ARTICLE_H
#include "entity.h"
//#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-13 13:04:30 +02:00
int getArticleNo();
2018-07-12 12:06:55 +02:00
std::string getDescription();
Seller* getSeller();
2018-07-20 11:52:26 +02:00
int getPrice() 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