COOPENOMICS  v1
Кооперативная Экономика
table_wallet_deposits.hpp
См. документацию.
1#pragma once
2
3
4#include "../core/ram_payer.hpp"
5#include <eosio/asset.hpp>
6#include <eosio/crypto.hpp>
7#include <eosio/eosio.hpp>
8
9#include "../consts.hpp"
10
11namespace WalletTables {
12
13using namespace eosio;
14
19struct [[eosio::table, eosio::contract(WALLET)]] deposit {
20 uint64_t id;
23 checksum256 deposit_hash;
24
25 asset quantity;
26 name status;
27
28 time_point_sec created_at = current_time_point();
29
30 uint64_t primary_key() const { return id; }
31 uint64_t by_username() const { return username.value; }
32 checksum256 by_hash() const { return deposit_hash; }
33 uint64_t by_status() const { return status.value; }
34 uint64_t by_created() const { return created_at.sec_since_epoch(); }
35};
36
37typedef multi_index<
38 "deposits"_n, deposit,
39 indexed_by<"byhash"_n, const_mem_fun<deposit, checksum256, &deposit::by_hash>>,
40 indexed_by<"byusername"_n, const_mem_fun<deposit, uint64_t, &deposit::by_username>>,
41 indexed_by<"bystatus"_n, const_mem_fun<deposit, uint64_t, &deposit::by_status>>,
42 indexed_by<"bycreated"_n, const_mem_fun<deposit, uint64_t, &deposit::by_created>>>
44
45} // namespace WalletTables
46
47// Плательщик за оперативную память строк таблицы — правило в lib/core/ram_payer.hpp.
contract
Definition: eosio.msig_tests.cpp:977
Definition: table_wallet_deposits.hpp:11
multi_index< "deposits"_n, deposit, indexed_by<"byhash"_n, const_mem_fun< deposit, checksum256, &deposit::by_hash > >, indexed_by<"byusername"_n, const_mem_fun< deposit, uint64_t, &deposit::by_username > >, indexed_by<"bystatus"_n, const_mem_fun< deposit, uint64_t, &deposit::by_status > >, indexed_by<"bycreated"_n, const_mem_fun< deposit, uint64_t, &deposit::by_created > > > deposits_index
Definition: table_wallet_deposits.hpp:43
Definition: eosio.msig.hpp:34
Definition: table_wallet_deposits.hpp:19
name coopname
Definition: table_wallet_deposits.hpp:21
uint64_t primary_key() const
Definition: table_wallet_deposits.hpp:30
name username
Definition: table_wallet_deposits.hpp:22
uint64_t by_created() const
Definition: table_wallet_deposits.hpp:34
uint64_t by_username() const
Definition: table_wallet_deposits.hpp:31
uint64_t id
Definition: table_wallet_deposits.hpp:20
checksum256 deposit_hash
Definition: table_wallet_deposits.hpp:23
checksum256 by_hash() const
Definition: table_wallet_deposits.hpp:32
uint64_t by_status() const
Definition: table_wallet_deposits.hpp:33
asset quantity
Definition: table_wallet_deposits.hpp:25
name status
Definition: table_wallet_deposits.hpp:26
Definition: table_registrator_orgs.hpp:17
RAM_PAYER_CLASS(WalletTables::deposit, cooperative)