COOPENOMICS  v1
Кооперативная Экономика
program_invests.hpp
См. документацию.
1#pragma once
2
3
4#include "../../../lib/core/ram_payer.hpp"
5using namespace eosio;
6using std::string;
7
8namespace Capital {
9 //TODO: УДАЛИТЬ после 07.2026 т.к. не используем
19 struct [[eosio::table, eosio::contract(CAPITAL)]] program_invest {
20 uint64_t id;
21 eosio::name coopname;
22 eosio::name username;
23 checksum256 invest_hash;
24 eosio::name status;
25 time_point_sec invested_at;
27 eosio::asset amount;
28
29 uint64_t primary_key() const { return id; }
30 uint64_t by_username() const { return username.value; }
31 checksum256 by_hash() const { return invest_hash; }
32 };
33
34typedef eosio::multi_index<
35 "progrinvests"_n, program_invest,
36 indexed_by<"byusername"_n, const_mem_fun<program_invest, uint64_t, &program_invest::by_username>>,
37 indexed_by<"byhash"_n, const_mem_fun<program_invest, checksum256, &program_invest::by_hash>>
39
40} // namespace Capital
41
42// Плательщик за оперативную память строк таблицы — правило в lib/core/ram_payer.hpp.
contract
Definition: eosio.msig_tests.cpp:977
Definition: balances.cpp:6
eosio::multi_index< "progrinvests"_n, program_invest, indexed_by<"byusername"_n, const_mem_fun< program_invest, uint64_t, &program_invest::by_username > >, indexed_by<"byhash"_n, const_mem_fun< program_invest, checksum256, &program_invest::by_hash > > > program_invest_index
Definition: program_invests.hpp:38
Definition: eosio.msig.hpp:34
RAM_PAYER_CLASS(Capital::program_invest, cooperative)
Таблица программных инвестиций (progrinvests): ранее использовалась для заявок на зачёт с этапом одоб...
Definition: program_invests.hpp:19
checksum256 by_hash() const
Индекс по хэшу инвестиции (3)
Definition: program_invests.hpp:31
document2 statement
Заявление на инвестицию
Definition: program_invests.hpp:26
checksum256 invest_hash
Хэш инвестиции
Definition: program_invests.hpp:23
eosio::name status
Статус инвестиции
Definition: program_invests.hpp:24
eosio::name username
Имя инвестора
Definition: program_invests.hpp:22
time_point_sec invested_at
Время создания инвестиции
Definition: program_invests.hpp:25
eosio::name coopname
Имя кооператива
Definition: program_invests.hpp:21
uint64_t by_username() const
Индекс по имени пользователя (2)
Definition: program_invests.hpp:30
uint64_t primary_key() const
Первичный ключ (1)
Definition: program_invests.hpp:29
uint64_t id
ID программной инвестиции (внутренний ключ)
Definition: program_invests.hpp:20
eosio::asset amount
Сумма инвестиции
Definition: program_invests.hpp:27
Definition: table_registrator_orgs.hpp:17
Definition: document_core.hpp:27