COOPENOMICS  v1
Кооперативная Экономика
table_ledger_writeoffs.hpp
См. документацию.
1#pragma once
2
3#include <eosio/asset.hpp>
4#include <eosio/crypto.hpp>
5#include <eosio/eosio.hpp>
6#include <string>
7
8#include "../consts.hpp"
9#include "document_core.hpp"
10
16struct [[eosio::table, eosio::contract(LEDGER)]] writeoff_op {
17 uint64_t id;
18 eosio::name coopname;
19 eosio::name username;
20 uint64_t account_id;
21 eosio::asset quantity;
22 std::string reason;
24 checksum256 writeoff_hash;
25 eosio::name status;
26
27 uint64_t primary_key() const { return id; }
28 uint64_t by_coop() const { return coopname.value; }
29 checksum256 by_hash() const { return writeoff_hash; }
30};
31
32typedef eosio::multi_index<
33 "writeoffs"_n, writeoff_op,
34 eosio::indexed_by<"bycoop"_n, eosio::const_mem_fun<writeoff_op, uint64_t, &writeoff_op::by_coop>>,
35 eosio::indexed_by<"byhash"_n, eosio::const_mem_fun<writeoff_op, checksum256, &writeoff_op::by_hash>>>
contract
Definition: eosio.msig_tests.cpp:977
Definition: eosio.msig.hpp:34
Definition: document_core.hpp:27
Definition: table_ledger_writeoffs.hpp:16
uint64_t account_id
Definition: table_ledger_writeoffs.hpp:20
uint64_t primary_key() const
Definition: table_ledger_writeoffs.hpp:27
eosio::name status
Definition: table_ledger_writeoffs.hpp:25
eosio::name coopname
Definition: table_ledger_writeoffs.hpp:18
eosio::asset quantity
Definition: table_ledger_writeoffs.hpp:21
checksum256 writeoff_hash
Definition: table_ledger_writeoffs.hpp:24
uint64_t id
Definition: table_ledger_writeoffs.hpp:17
eosio::name username
Definition: table_ledger_writeoffs.hpp:19
uint64_t by_coop() const
Definition: table_ledger_writeoffs.hpp:28
std::string reason
Definition: table_ledger_writeoffs.hpp:22
document2 document
Definition: table_ledger_writeoffs.hpp:23
checksum256 by_hash() const
Definition: table_ledger_writeoffs.hpp:29
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:36