10 auto account_itr = accounts.find(username.value);
11 eosio::check(account_itr != accounts.end(),
"Аккаунт не найден");
38 checksum256
by_hash()
const {
return registration_hash; }
41 typedef eosio::multi_index<
"candidates"_n, candidate_legacy,
42 eosio::indexed_by<
"byhash"_n, eosio::const_mem_fun<candidate_legacy, checksum256, &candidate_legacy::by_hash>>
66 checksum256
by_hash()
const {
return registration_hash; }
69 typedef eosio::multi_index<
"candidates2"_n, candidate,
70 eosio::indexed_by<
"byhash"_n, eosio::const_mem_fun<candidate, checksum256, &candidate::by_hash>>
82 auto secondary_index = primary_index.get_index<
"byhash"_n>();
84 auto itr = secondary_index.find(hash);
85 if (itr == secondary_index.end()) {
99 using namespace eosio;
103 auto coop_itr = cooperatives.find(coopname.value);
105 if (coop_itr == cooperatives.end() || !coop_itr->is_cooperative || !coop_itr->active_participants_count.has_value()) {
106 eosio::check(
false,
"Счетчик пайщиков кооператива не найден");
109 return coop_itr->active_participants_count.value();
eosio::multi_index< "accounts"_n, account, eosio::indexed_by< "byreferer"_n, eosio::const_mem_fun< account, uint64_t, &account::by_referer > >, eosio::indexed_by<"bytype"_n, eosio::const_mem_fun< account, uint64_t, &account::by_type > >, eosio::indexed_by<"bystatus"_n, eosio::const_mem_fun< account, uint64_t, &account::by_status > >, eosio::indexed_by<"byregistr"_n, eosio::const_mem_fun< account, uint64_t, &account::by_registr > >, eosio::indexed_by<"byregistred"_n, eosio::const_mem_fun< account, uint64_t, &account::by_registered_at > >, eosio::indexed_by<"byverif"_n, eosio::const_mem_fun< account, uint64_t,&account::is_verified_index > > > accounts_index
Definition: accounts.hpp:150
eosio::multi_index<"coops"_n, cooperative2, eosio::indexed_by<"iscoop"_n, eosio::const_mem_fun< cooperative2, uint64_t, &cooperative2::is_coop_index > >, eosio::indexed_by<"byparent"_n, eosio::const_mem_fun< cooperative2, uint64_t, &cooperative2::by_parent > >, eosio::indexed_by<"bycoopchilds"_n, eosio::const_mem_fun< cooperative2, uint128_t, &cooperative2::by_coop_childs > >, eosio::indexed_by<"bycooptype"_n, eosio::const_mem_fun< cooperative2, uint64_t, &cooperative2::bycooptype > > > cooperatives2_index
Definition: accounts.hpp:391
static constexpr eosio::name _registrator
Definition: consts.hpp:157
contract
Definition: eosio.msig_tests.cpp:977
Definition: shared_registrator.hpp:1
account get_account_or_fail(eosio::name username)
Получает аккаунт по имени пользователя
Definition: shared_registrator.hpp:8
Definition: shared_registrator.hpp:16
uint64_t get_active_participants_count(eosio::name coopname)
Получает количество активных пайщиков кооператива.
Definition: shared_registrator.hpp:98
eosio::multi_index<"candidates"_n, candidate_legacy, eosio::indexed_by<"byhash"_n, eosio::const_mem_fun< candidate_legacy, checksum256, &candidate_legacy::by_hash > > > candidates_legacy_index
Definition: shared_registrator.hpp:43
eosio::multi_index<"candidates2"_n, candidate, eosio::indexed_by<"byhash"_n, eosio::const_mem_fun< candidate, checksum256, &candidate::by_hash > > > candidates_index
Definition: shared_registrator.hpp:71
std::optional< candidate > get_candidate_by_hash(eosio::name coopname, const checksum256 &hash)
Получает кандидата по хэшу регистрации.
Definition: shared_registrator.hpp:80
Definition: eosio.msig.hpp:34
Структура кандидата на вступление (устаревшая версия).
Definition: shared_registrator.hpp:26
eosio::name braname
Имя филиала
Definition: shared_registrator.hpp:29
checksum256 registration_hash
Идентификатор платежа регистрационного взноса
Definition: shared_registrator.hpp:33
name status
Статус: created | payed.
Definition: shared_registrator.hpp:30
uint64_t primary_key() const
Definition: shared_registrator.hpp:37
checksum256 by_hash() const
Индекс по хэшу платежа
Definition: shared_registrator.hpp:38
eosio::name username
Имя аккаунта пайщика
Definition: shared_registrator.hpp:27
document statement
Заявление на вступление
Definition: shared_registrator.hpp:32
eosio::asset minimum
Минимальный взнос
Definition: shared_registrator.hpp:35
eosio::time_point_sec created_at
Время регистрации аккаунта
Definition: shared_registrator.hpp:31
eosio::asset initial
Начальный взнос
Definition: shared_registrator.hpp:34
eosio::name coopname
Имя кооператива
Definition: shared_registrator.hpp:28
Структура кандидата на вступление.
Definition: shared_registrator.hpp:54
uint64_t primary_key() const
Definition: shared_registrator.hpp:65
eosio::name coopname
Имя кооператива
Definition: shared_registrator.hpp:56
eosio::time_point_sec created_at
Время регистрации аккаунта
Definition: shared_registrator.hpp:59
eosio::asset initial
Начальный взнос
Definition: shared_registrator.hpp:62
document2 statement
Заявление на вступление
Definition: shared_registrator.hpp:60
checksum256 registration_hash
Идентификатор платежа регистрационного взноса
Definition: shared_registrator.hpp:61
checksum256 by_hash() const
Индекс по хэшу платежа
Definition: shared_registrator.hpp:66
eosio::name braname
Имя филиала
Definition: shared_registrator.hpp:57
eosio::name username
Имя аккаунта пайщика
Definition: shared_registrator.hpp:55
eosio::asset minimum
Минимальный взнос
Definition: shared_registrator.hpp:63
name status
Статус: created | payed.
Definition: shared_registrator.hpp:58
Структура, представляющая учетные записи аккаунтов.
Definition: accounts.hpp:60
Definition: drafts.hpp:28