#ifndef QUERY_ORDER_DETAILS_HPP #define QUERY_ORDER_DETAILS_HPP #include "product.hpp" #include "matador/sql/entity.hpp" namespace matador::test { struct order; struct order_details { unsigned long order_details_id; sql::entity order_; sql::entity product_; template void process(Operator &op) { namespace field = matador::utils::access; field::primary_key(op, "order_details_id", order_details_id); field::belongs_to(op, "order_id", order_, utils::default_foreign_attributes); field::has_one(op, "product_id", product_, utils::default_foreign_attributes); } }; } #endif //QUERY_ORDER_DETAILS_HPP