2024-01-03 22:44:36 +08:00
|
|
|
#ifndef __TASK_H__
|
|
|
|
#define __TASK_H__
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
#include <string>
|
|
|
|
|
2024-01-04 23:32:07 +08:00
|
|
|
class Task;
|
|
|
|
using Tasks = std::list<Task>;
|
|
|
|
|
2024-01-03 22:44:36 +08:00
|
|
|
class Task {
|
|
|
|
public:
|
|
|
|
int id = -1;
|
2024-01-04 23:32:07 +08:00
|
|
|
int parentId = -1;
|
2024-01-03 22:44:36 +08:00
|
|
|
bool finished = false;
|
|
|
|
int32_t createTime = 0;
|
|
|
|
std::string content;
|
|
|
|
std::string comment;
|
2024-01-04 23:32:07 +08:00
|
|
|
Tasks children;
|
2024-01-03 22:44:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
namespace boost {
|
|
|
|
namespace json {
|
|
|
|
std::string serialize(const Tasks &tasks);
|
|
|
|
}
|
|
|
|
} // namespace boost
|
|
|
|
|
|
|
|
#endif // __TASK_H__
|