kima2/src/core/article.h

38 lines
767 B
C++

#ifndef ARTICLE_H
#define ARTICLE_H
#include "entity.h"
#include "sale.h"
#include "seller.h"
#include <memory>
#include <string>
class Seller;
class Sale;
class Article : public Entity
{
public:
Article();
Article(std::shared_ptr<Seller> sellerPtr);
void setArticleNo(int articleNo);
void setPrice(int price);
void setDescription(const std::string& description);
bool isSold();
void setSale(std::shared_ptr<Sale> salePtr);
void setSeller(std::shared_ptr<Seller> sellerPtr);
std::string getDescription();
Seller* getSeller();
int getPrice();
private:
std::shared_ptr<Seller> sellerPtr_{};
std::shared_ptr<Sale> salePtr_{};
int articleNo_{};
int price_{};
std::string description_{};
};
#endif