#235 Fix game_object, match_object, tournament_object FC_REFLECT for writing to db

This commit is contained in:
Vlad Dobromyslov 2022-02-15 16:44:02 +03:00
parent 8b611c3f95
commit 065c9d1546
3 changed files with 27 additions and 8 deletions

View file

@ -166,6 +166,9 @@ FC_REFLECT_ENUM(graphene::chain::game_state,
(game_complete))
//FC_REFLECT_TYPENAME(graphene::chain::game_object) // manually serialized
FC_REFLECT(graphene::chain::game_object, (players))
FC_REFLECT_DERIVED(graphene::chain::game_object, (graphene::db::object),
(match_id)
(players)
(winners)
(game_details)
(next_timeout))

View file

@ -163,5 +163,13 @@ FC_REFLECT_ENUM(graphene::chain::match_state,
(match_complete))
//FC_REFLECT_TYPENAME(graphene::chain::match_object) // manually serialized
FC_REFLECT(graphene::chain::match_object, (players))
FC_REFLECT_DERIVED(graphene::chain::match_object, (graphene::db::object),
(tournament_id)
(players)
(games)
(game_winners)
(number_of_wins)
(number_of_ties)
(match_winners)
(start_time)
(end_time))

View file

@ -240,12 +240,20 @@ FC_REFLECT_DERIVED(graphene::chain::tournament_details_object, (graphene::db::ob
(payers)
(players_payers)
(matches))
//FC_REFLECT_TYPENAME(graphene::chain::tournament_object) // manually serialized
FC_REFLECT(graphene::chain::tournament_object, (creator))
FC_REFLECT_DERIVED(graphene::chain::tournament_object, (graphene::db::object),
(creator)
(options)
(start_time)
(end_time)
(prize_pool)
(registered_players)
(tournament_details_id))
FC_REFLECT_ENUM(graphene::chain::tournament_state,
(accepting_registrations)
(awaiting_start)
(in_progress)
(registration_period_expired)
(concluded))
(concluded))