kima2/src/core/article.h

32 lines
676 B
C++

#ifndef ARTICLE_H
#define ARTICLE_H
#include "entity.h"
#include "seller.h"
#include "sale.h"
#include <string>
#include <memory>
class Seller;
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(const std::shared_ptr<Sale> salePtr);
void setSeller(std::shared_ptr<Seller> sellerPtr);
private:
std::shared_ptr<Seller> sellerPtr_{};
std::shared_ptr<Sale> salePtr_{};
int articleNo_{};
int price_{};
std::string description_{};
};
#endif