2018-07-11 12:53:18 +02:00
|
|
|
#ifndef SALE_H
|
|
|
|
#define SALE_H
|
|
|
|
|
2018-07-12 13:34:17 +02:00
|
|
|
#include "article.h"
|
2018-07-11 12:53:18 +02:00
|
|
|
|
2018-07-12 13:34:17 +02:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <boost/date_time.hpp>
|
|
|
|
|
|
|
|
class Article;
|
|
|
|
|
|
|
|
class Sale : public Entity
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
int sumInCents();
|
2018-07-12 13:42:22 +02:00
|
|
|
void addArticle(std::shared_ptr<Article> articlePtr);
|
2018-07-12 13:34:17 +02:00
|
|
|
private:
|
|
|
|
boost::posix_time::ptime systemTime_{boost::posix_time::second_clock::local_time()};
|
2018-07-12 13:42:22 +02:00
|
|
|
std::vector<std::shared_ptr<Article>> articles_{};
|
2018-07-11 12:53:18 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|