COOPENOMICS  v1
Кооперативная Экономика
table_ledger_writeoffs.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#include <string>
9
10#include "../consts.hpp"
11#include "document_core.hpp"
12
18struct [[eosio::table, eosio::contract(LEDGER)]] writeoff_op {
19 uint64_t id;
20 eosio::name coopname;
21 eosio::name username;
22 uint64_t account_id;
23 eosio::asset quantity;
24 std::string reason;
26 checksum256 writeoff_hash;
27 eosio::name status;
28
29 uint64_t primary_key() const { return id; }
30 uint64_t by_coop() const { return coopname.value; }
31 checksum256 by_hash() const { return writeoff_hash; }
32};
33
34typedef eosio::multi_index<
35 "writeoffs"_n, writeoff_op,
36 eosio::indexed_by<"bycoop"_n, eosio::const_mem_fun<writeoff_op, uint64_t, &writeoff_op::by_coop>>,
37 eosio::indexed_by<"byhash"_n, eosio::const_mem_fun<writeoff_op, checksum256, &writeoff_op::by_hash>>>
39
40// Плательщик за оперативную память строк таблицы — правило в lib/core/ram_payer.hpp.
contract
Definition: eosio.msig_tests.cpp:977
Definition: eosio.msig.hpp:34
Definition: table_registrator_orgs.hpp:17
Definition: document_core.hpp:27
Definition: table_ledger_writeoffs.hpp:18
uint64_t account_id
Definition: table_ledger_writeoffs.hpp:22
uint64_t primary_key() const
Definition: table_ledger_writeoffs.hpp:29
eosio::name status
Definition: table_ledger_writeoffs.hpp:27
eosio::name coopname
Definition: table_ledger_writeoffs.hpp:20
eosio::asset quantity
Definition: table_ledger_writeoffs.hpp:23
checksum256 writeoff_hash
Definition: table_ledger_writeoffs.hpp:26
uint64_t id
Definition: table_ledger_writeoffs.hpp:19
eosio::name username
Definition: table_ledger_writeoffs.hpp:21
uint64_t by_coop() const
Definition: table_ledger_writeoffs.hpp:30
std::string reason
Definition: table_ledger_writeoffs.hpp:24
document2 document
Definition: table_ledger_writeoffs.hpp:25
checksum256 by_hash() const
Definition: table_ledger_writeoffs.hpp:31
RAM_PAYER_CLASS(writeoff_op, cooperative)
eosio::multi_index< "writeoffs"_n, writeoff_op, eosio::indexed_by<"bycoop"_n, eosio::const_mem_fun< writeoff_op, uint64_t, &writeoff_op::by_coop > >, eosio::indexed_by<"byhash"_n, eosio::const_mem_fun< writeoff_op, checksum256, &writeoff_op::by_hash > > > writeoffs_index
Definition: table_ledger_writeoffs.hpp:38