kima2/src/core/seller.h

36 lines
821 B
C
Raw Normal View History

2018-07-09 16:06:27 +02:00
#ifndef SELLER_H
#define SELLER_H
#include "article.h"
2018-07-11 11:53:46 +02:00
#include "entity.h"
2018-07-09 16:06:27 +02:00
#include <string>
#include <vector>
class Article;
class Seller : public Entity
{
public:
2018-07-11 11:53:46 +02:00
Seller();
Seller(const std::string& firstName, const std::string& lastName, int sellerNo = 0,
int numberOfArticles = 0);
2018-07-11 13:25:39 +02:00
2018-07-09 16:06:27 +02:00
void setSellerNo(int sellerNo);
void setFirstName(const std::string& firstName);
void setLastName(const std::string& lastName);
void setNumberOfOfferedArticles(int number);
2018-07-11 13:25:39 +02:00
void addArticle(Article article);
2018-07-09 16:06:27 +02:00
2018-07-11 13:25:39 +02:00
std::vector<Article*> getArticles(bool onlySold = false);
2018-07-09 16:06:27 +02:00
size_t getNumberOfOfferedArticles();
private:
2018-07-10 12:51:03 +02:00
int sellerNo_{-1};
int numberOfOfferedArticles_{};
std::string firstName_{};
std::string lastName_{};
std::vector<Article> articles_{};
2018-07-09 16:06:27 +02:00
};
#endif