3#include <eosio/asset.hpp>
4#include <eosio/crypto.hpp>
5#include <eosio/eosio.hpp>
9#include "../consts.hpp"
31 eosio::time_point_sec created_at = current_time_point();
35 checksum256
by_hash()
const {
return income_hash; }
39typedef eosio::multi_index<
41 eosio::indexed_by<
"byhash"_n, eosio::const_mem_fun<income, checksum256, &income::by_hash>>,
42 eosio::indexed_by<
"byusername"_n, eosio::const_mem_fun<income, uint64_t, &income::by_username>>,
43 eosio::indexed_by<
"bystatus"_n, eosio::const_mem_fun<income, uint64_t, &income::by_status>>>
46inline std::optional<income>
get_income(eosio::name coopname,
const checksum256 &hash) {
48 auto secondary_index = primary_index.get_index<
"byhash"_n>();
50 auto itr = secondary_index.find(hash);
51 if (itr == secondary_index.end()) {
static constexpr eosio::name _gateway
Definition: consts.hpp:152
contract
Definition: eosio.msig_tests.cpp:977
Definition: gateway.hpp:20
std::optional< income > get_income(eosio::name coopname, const checksum256 &hash)
Definition: table_gateway_incomes.hpp:46
eosio::multi_index< "incomes"_n, income, eosio::indexed_by<"byhash"_n, eosio::const_mem_fun< income, checksum256, &income::by_hash > >, eosio::indexed_by<"byusername"_n, eosio::const_mem_fun< income, uint64_t, &income::by_username > >, eosio::indexed_by<"bystatus"_n, eosio::const_mem_fun< income, uint64_t, &income::by_status > > > incomes_index
Definition: table_gateway_incomes.hpp:44
Definition: eosio.msig.hpp:34
Definition: table_gateway_incomes.hpp:18
eosio::name coopname
Definition: table_gateway_incomes.hpp:20
checksum256 income_hash
Definition: table_gateway_incomes.hpp:23
uint64_t by_username() const
Definition: table_gateway_incomes.hpp:34
eosio::asset quantity
Definition: table_gateway_incomes.hpp:28
checksum256 by_hash() const
Definition: table_gateway_incomes.hpp:35
eosio::name callback_contract
Definition: table_gateway_incomes.hpp:24
uint64_t by_status() const
Definition: table_gateway_incomes.hpp:36
eosio::name confirm_callback
Definition: table_gateway_incomes.hpp:25
uint64_t primary_key() const
Definition: table_gateway_incomes.hpp:33
eosio::name status
Definition: table_gateway_incomes.hpp:29
eosio::name decline_callback
Definition: table_gateway_incomes.hpp:26
eosio::name username
Definition: table_gateway_incomes.hpp:21
uint64_t id
Definition: table_gateway_incomes.hpp:19
eosio::name type
Definition: table_gateway_incomes.hpp:22