COOPENOMICS  v1
Кооперативная Экономика
table_branch_expenses.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
34struct [[eosio::table, eosio::contract(BRANCH)]] branch_expense {
35 uint64_t id;
36 eosio::checksum256 hash;
37 eosio::name braname;
38 eosio::name creator;
39 eosio::asset amount;
43 eosio::binary_extension<eosio::name> source;
44
45 uint64_t primary_key() const { return id; }
46 eosio::checksum256 by_hash() const { return hash; }
47 uint64_t by_branch() const { return braname.value; }
48};
49
50typedef eosio::multi_index<
51 "expenses"_n, branch_expense,
52 eosio::indexed_by<"byhash"_n, eosio::const_mem_fun<branch_expense, eosio::checksum256, &branch_expense::by_hash>>,
53 eosio::indexed_by<"bybranch"_n, eosio::const_mem_fun<branch_expense, uint64_t, &branch_expense::by_branch>>>
55
56// Плательщик за оперативную память строк таблицы — правило в lib/core/ram_payer.hpp.
contract
Definition: eosio.msig_tests.cpp:977
Definition: eosio.msig.hpp:34
Расход кооперативного участка, поданный в шасси расходов (requirement b6 «Экономика КУ»; процесс p....
Definition: table_branch_expenses.hpp:34
eosio::checksum256 hash
идентификатор расхода (= proposal_hash в шасси расходов)
Definition: table_branch_expenses.hpp:36
eosio::name creator
кто подал служебную записку
Definition: table_branch_expenses.hpp:38
uint64_t primary_key() const
Definition: table_branch_expenses.hpp:45
eosio::asset amount
Definition: table_branch_expenses.hpp:39
uint64_t id
суррогатный ключ (scope coopname)
Definition: table_branch_expenses.hpp:35
eosio::checksum256 by_hash() const
Definition: table_branch_expenses.hpp:46
eosio::name braname
кооперативный участок — владелец средств
Definition: table_branch_expenses.hpp:37
eosio::binary_extension< eosio::name > source
Definition: table_branch_expenses.hpp:43
uint64_t by_branch() const
Definition: table_branch_expenses.hpp:47
Definition: table_registrator_orgs.hpp:17
RAM_PAYER_CLASS(branch_expense, cooperative)
eosio::multi_index< "expenses"_n, branch_expense, eosio::indexed_by<"byhash"_n, eosio::const_mem_fun< branch_expense, eosio::checksum256, &branch_expense::by_hash > >, eosio::indexed_by<"bybranch"_n, eosio::const_mem_fun< branch_expense, uint64_t, &branch_expense::by_branch > > > branch_expenses_index
Definition: table_branch_expenses.hpp:54