3#include <eosio/crypto.hpp>
4#include <eosio/eosio.hpp>
9#include "../consts.hpp"
30 checksum256
by_hash()
const {
return approval_hash; }
32 uint64_t
by_type()
const {
return type.value; }
36 "approvals"_n, approval,
37 indexed_by<
"byhash"_n, const_mem_fun<approval, checksum256, &approval::by_hash>>,
38 indexed_by<
"byusername"_n, const_mem_fun<approval, uint64_t, &approval::by_username>>,
39 indexed_by<
"bytype"_n, const_mem_fun<approval, uint64_t, &approval::by_type>>>
42inline std::optional<approval>
get_approval(name coopname,
const checksum256 &hash) {
44 auto secondary_index = primary_index.get_index<
"byhash"_n>();
46 auto itr = secondary_index.find(hash);
47 if (itr == secondary_index.end()) {
static constexpr eosio::name _soviet
Definition: consts.hpp:156
contract
Definition: eosio.msig_tests.cpp:977
Definition: table_soviet_approvals.hpp:12
multi_index< "approvals"_n, approval, indexed_by<"byhash"_n, const_mem_fun< approval, checksum256, &approval::by_hash > >, indexed_by<"byusername"_n, const_mem_fun< approval, uint64_t, &approval::by_username > >, indexed_by<"bytype"_n, const_mem_fun< approval, uint64_t, &approval::by_type > > > approvals_index
Definition: table_soviet_approvals.hpp:40
std::optional< approval > get_approval(name coopname, const checksum256 &hash)
Definition: table_soviet_approvals.hpp:42
Definition: eosio.msig.hpp:34
Definition: table_soviet_approvals.hpp:16
name callback_action_approve
Definition: table_soviet_approvals.hpp:24
std::string meta
Definition: table_soviet_approvals.hpp:26
checksum256 by_hash() const
Definition: table_soviet_approvals.hpp:30
name callback_contract
Definition: table_soviet_approvals.hpp:23
name username
Definition: table_soviet_approvals.hpp:19
name type
Definition: table_soviet_approvals.hpp:20
name coopname
Definition: table_soviet_approvals.hpp:18
uint64_t by_username() const
Definition: table_soviet_approvals.hpp:31
name callback_action_decline
Definition: table_soviet_approvals.hpp:25
checksum256 approval_hash
Definition: table_soviet_approvals.hpp:22
document2 document
Definition: table_soviet_approvals.hpp:21
time_point_sec created_at
Definition: table_soviet_approvals.hpp:27
uint64_t by_type() const
Definition: table_soviet_approvals.hpp:32
uint64_t primary_key() const
Definition: table_soviet_approvals.hpp:29
uint64_t id
Definition: table_soviet_approvals.hpp:17
Definition: document_core.hpp:27