2021-08-21 13:53:23 +02:00
|
|
|
#ifndef RESOURCE_H
|
|
|
|
#define RESOURCE_H
|
|
|
|
|
2021-11-01 19:53:35 +01:00
|
|
|
#include "core/string.h"
|
2021-08-21 14:40:30 +02:00
|
|
|
|
2021-08-21 13:53:23 +02:00
|
|
|
#include "reference.h"
|
2021-08-21 17:12:48 +02:00
|
|
|
#include "rapidjson/document.h"
|
|
|
|
|
2021-08-21 14:40:30 +02:00
|
|
|
#if DATABASES_ENABLED
|
|
|
|
class Database;
|
|
|
|
#endif
|
|
|
|
|
2021-08-21 13:53:23 +02:00
|
|
|
class Resource : public Reference {
|
|
|
|
RCPP_OBJECT(Resource, Reference);
|
|
|
|
|
|
|
|
public:
|
2021-08-22 20:57:37 +02:00
|
|
|
int id;
|
2021-08-21 14:40:30 +02:00
|
|
|
|
2021-11-01 19:53:35 +01:00
|
|
|
virtual String to_json(rapidjson::Document *into = nullptr);
|
|
|
|
virtual void from_json(const String &data);
|
2021-08-21 14:40:30 +02:00
|
|
|
|
2021-08-21 13:53:23 +02:00
|
|
|
Resource();
|
|
|
|
~Resource();
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|