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;
40
41 uint64_t primary_key() const { return id; }
42 eosio::checksum256 by_hash() const { return hash; }
43 uint64_t by_branch() const { return braname.value; }
44};
45
46typedef eosio::multi_index<
47 "expenses"_n, branch_expense,
48 eosio::indexed_by<"byhash"_n, eosio::const_mem_fun<branch_expense, eosio::checksum256, &branch_expense::by_hash>>,
49 eosio::indexed_by<"bybranch"_n, eosio::const_mem_fun<branch_expense, uint64_t, &branch_expense::by_branch>>>
51
52// Плательщик за оперативную память строк таблицы — правило в 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:41
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:42
eosio::name braname
кооперативный участок — владелец средств
Definition: table_branch_expenses.hpp:37
uint64_t by_branch() const
Definition: table_branch_expenses.hpp:43
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:50