Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <graphene/db/object.hpp>
- #include <graphene/db/generic_index.hpp>
- #include <graphene/chain/protocol/types.hpp>
- #include <boost/multi_index_container_fwd.hpp>
- using std::string;
- namespace graphene
- {
- namespace chain
- {
- /**
- *Definition of user object
- ** Save user data while account creation.
- */
- class user_object : public graphene::db::abstract_object<user_object>
- {
- public:
- static const uint8_t space_id = implementation_ids;
- static const uint8_t type_id = impl_user_object_type;
- //Number to identify the user object.
- account_id_type external_user_account; //graphene user account
- string FirstName;
- string PhoneNumber;
- };
- // These structures are used in the multi_index_container....
- struct by_external_user_account;
- // creating object index
- typedef multi_index_container<
- user_object,
- indexed_by<
- ordered_unique<
- tag<by_id>, member<object, object_id_type, &object::id>>,
- ordered_unique<
- tag<by_external_user_account>, member<user_object, account_id_type, &user_object::external_user_account>>>>
- user_object_index_type;
- typedef generic_index<user_object, user_object_index_type> user_index;
- } // namespace chain
- } // namespace graphene
- FC_REFLECT_DERIVED(graphene::chain::user_object, (graphene::db::object),
- (external_user_account)(FirstName)(PhoneNumber));
Add Comment
Please, Sign In to add comment