adjust work project to the current codebase
This commit is contained in:
@@ -7,12 +7,12 @@
|
||||
#include "Task.hpp"
|
||||
|
||||
#include "../core/Model.hpp"
|
||||
#include "../core/Types.hpp"
|
||||
#include "../core/UserInfo.hpp"
|
||||
|
||||
#include "matador/object/object_ptr.hpp"
|
||||
|
||||
#include "matador/utils/base_class.hpp"
|
||||
#include "matador/utils/foreign_attributes.hpp"
|
||||
|
||||
namespace work::models::jobs {
|
||||
|
||||
@@ -21,7 +21,7 @@ struct Job : core::Model {
|
||||
std::string description;
|
||||
JobState state;
|
||||
JobMode mode;
|
||||
core::timestamp created_at;
|
||||
matador::utils::timestamp created_at;
|
||||
matador::object::object_ptr<Payload> payload;
|
||||
matador::object::object_ptr<Task> task;
|
||||
core::UserInfo user_info;
|
||||
@@ -35,8 +35,8 @@ struct Job : core::Model {
|
||||
field::attribute( op, "state", state );
|
||||
field::attribute( op, "mode", mode );
|
||||
field::attribute( op, "created_at", created_at );
|
||||
field::has_one(op, "payload", payload, matador::utils::default_foreign_attributes );
|
||||
field::belongs_to( op, "task", task, matador::utils::default_foreign_attributes );
|
||||
field::has_one(op, "payload", payload, matador::utils::CascadeAllFetchLazy );
|
||||
field::belongs_to( op, "task", task, matador::utils::CascadeAllFetchLazy );
|
||||
field::attribute( op, "user_info", user_info );
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user