You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
551 B

5 years ago
#pragma once
#include <data.hpp>
#include <fs.hpp>
#include <future>
#include <json.hpp>
5 years ago
struct order {
std::string name;
std::string address;
std::string phone;
std::string email;
int id;
};
inline void to_json(json &, const order &order);
inline void from_json(const json &, order &order);
class orders {
std::vector<order> data;
5 years ago
const with_data_directory &data_directory;
const fs::path &get_path();
5 years ago
void sort();
5 years ago
public:
void write();
5 years ago
void load();
orders(const with_data_directory &);
void push(json);
5 years ago
~orders();
5 years ago
};