4#include "../core/ram_payer.hpp"
5#include <eosio/crypto.hpp>
6#include <eosio/eosio.hpp>
11#include "../consts.hpp"
32 checksum256
by_hash()
const {
return approval_hash; }
34 uint64_t
by_type()
const {
return type.value; }
38 "approvals"_n, approval,
39 indexed_by<
"byhash"_n, const_mem_fun<approval, checksum256, &approval::by_hash>>,
40 indexed_by<
"byusername"_n, const_mem_fun<approval, uint64_t, &approval::by_username>>,
41 indexed_by<
"bytype"_n, const_mem_fun<approval, uint64_t, &approval::by_type>>>
44inline std::optional<approval>
get_approval(name coopname,
const checksum256 &hash) {
46 auto secondary_index = primary_index.get_index<
"byhash"_n>();
48 auto itr = secondary_index.find(hash);
49 if (itr == secondary_index.end()) {
static constexpr eosio::name _soviet
Definition: consts.hpp:177
contract
Definition: eosio.msig_tests.cpp:977
Definition: table_soviet_approvals.hpp:14
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:42
std::optional< approval > get_approval(name coopname, const checksum256 &hash)
Definition: table_soviet_approvals.hpp:44
Definition: eosio.msig.hpp:34
Definition: table_soviet_approvals.hpp:18
name callback_action_approve
Definition: table_soviet_approvals.hpp:26
std::string meta
Definition: table_soviet_approvals.hpp:28
checksum256 by_hash() const
Definition: table_soviet_approvals.hpp:32
name callback_contract
Definition: table_soviet_approvals.hpp:25
name username
Definition: table_soviet_approvals.hpp:21
name type
Definition: table_soviet_approvals.hpp:22
name coopname
Definition: table_soviet_approvals.hpp:20
uint64_t by_username() const
Definition: table_soviet_approvals.hpp:33
name callback_action_decline
Definition: table_soviet_approvals.hpp:27
checksum256 approval_hash
Definition: table_soviet_approvals.hpp:24
document2 document
Definition: table_soviet_approvals.hpp:23
time_point_sec created_at
Definition: table_soviet_approvals.hpp:29
uint64_t by_type() const
Definition: table_soviet_approvals.hpp:34
uint64_t primary_key() const
Definition: table_soviet_approvals.hpp:31
uint64_t id
Definition: table_soviet_approvals.hpp:19
Definition: table_registrator_orgs.hpp:17
Definition: document_core.hpp:27
RAM_PAYER_CLASS(Approver::approval, cooperative)