kima2/src/core/article.cpp

27 lines
780 B
C++
Raw Normal View History

2018-07-09 16:06:27 +02:00
#include "article.h"
2018-07-11 12:52:57 +02:00
Article::Article() : Entity() {}
2018-07-09 16:06:27 +02:00
2018-07-12 14:37:56 +02:00
// Article::Article(std::shared_ptr<Seller> sellerPtr) : Entity() { sellerPtr_ = sellerPtr; }
2018-07-09 16:06:27 +02:00
2018-07-11 12:52:57 +02:00
void Article::setArticleNo(int articleNo) { articleNo_ = articleNo; }
2018-07-09 16:06:27 +02:00
2018-07-11 12:52:57 +02:00
void Article::setPrice(int price) { price_ = price; }
2018-07-09 16:06:27 +02:00
2018-07-11 12:52:57 +02:00
void Article::setDescription(const std::string& description) { description_ = description; }
2018-07-12 14:37:56 +02:00
void Article::setSale(Sale* salePtr) { salePtr_ = salePtr; }
void Article::setSeller(Seller* sellerPtr) { sellerPtr_ = sellerPtr; }
2018-07-11 12:52:57 +02:00
2018-07-12 12:06:55 +02:00
bool Article::isSold() { return salePtr_ ? true : false; }
std::string Article::getDescription() { return description_; }
2018-07-12 14:37:56 +02:00
Seller* Article::getSeller() { return sellerPtr_; }
2018-07-12 13:36:13 +02:00
2018-07-13 13:04:30 +02:00
int Article::getPrice() { return price_; }
int Article::getArticleNo() {
return articleNo_;
}