23 lines
628 B
C++
23 lines
628 B
C++
#ifndef ID_LIST_PAYLOAD_HPP
|
|
#define ID_LIST_PAYLOAD_HPP
|
|
|
|
#include "Payload.hpp"
|
|
|
|
#include "matador/object/collection.hpp"
|
|
|
|
#include "matador/utils/foreign_attributes.hpp"
|
|
|
|
namespace work::models::jobs {
|
|
struct IdListPayload : Payload {
|
|
matador::object::collection<uint64_t> payload_ids;
|
|
template<typename Operator>
|
|
void process( Operator& op ) {
|
|
namespace field = matador::access;
|
|
field::process( op, *matador::base_class<Payload>( this ) );
|
|
field::has_many( op, "payload_ids", payload_ids, "payload_id", matador::utils::default_foreign_attributes );
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif //ID_LIST_PAYLOAD_HPP
|