3#include <eosio/asset.hpp>
4#include <eosio/binary_extension.hpp>
5#include <eosio/eosio.hpp>
7#include "../consts.hpp"
22 bool is_initial =
true;
23 bool is_minimum =
true;
26 eosio::binary_extension<eosio::name>
type;
27 eosio::binary_extension<eosio::name>
braname;
34 uint64_t
bylastpay()
const {
return last_min_pay.sec_since_epoch(); }
38 bool is_active()
const {
return status ==
"accepted"_n; }
40 uint64_t
by_braname()
const {
return braname.has_value() ? braname->value : 0; }
43typedef eosio::multi_index<
45 eosio::indexed_by<
"bylastpay"_n, eosio::const_mem_fun<participant, uint64_t, &participant::bylastpay>>,
46 eosio::indexed_by<
"createdat"_n, eosio::const_mem_fun<participant, uint64_t, &participant::by_created_at>>,
47 eosio::indexed_by<
"bybranch"_n, eosio::const_mem_fun<participant, uint64_t, &participant::by_braname>>>
contract
Definition: eosio.msig_tests.cpp:977
Definition: eosio.msig.hpp:34
Definition: table_soviet_participants.hpp:14
eosio::binary_extension< eosio::name > braname
Definition: table_soviet_participants.hpp:27
uint64_t bylastpay() const
Definition: table_soviet_participants.hpp:34
uint64_t by_braname() const
Definition: table_soviet_participants.hpp:40
eosio::name username
Definition: table_soviet_participants.hpp:15
eosio::binary_extension< eosio::name > type
Definition: table_soviet_participants.hpp:26
eosio::binary_extension< eosio::asset > minimum_amount
Definition: table_soviet_participants.hpp:30
eosio::time_point_sec created_at
Definition: table_soviet_participants.hpp:16
eosio::name status
Definition: table_soviet_participants.hpp:20
uint64_t primary_key() const
Definition: table_soviet_participants.hpp:32
eosio::time_point_sec last_update
Definition: table_soviet_participants.hpp:17
eosio::binary_extension< eosio::asset > initial_amount
Definition: table_soviet_participants.hpp:29
eosio::time_point_sec last_min_pay
Definition: table_soviet_participants.hpp:18
uint64_t by_created_at() const
Definition: table_soviet_participants.hpp:36
bool is_active() const
Definition: table_soviet_participants.hpp:38
eosio::multi_index< "participants"_n, participant, eosio::indexed_by<"bylastpay"_n, eosio::const_mem_fun< participant, uint64_t, &participant::bylastpay > >, eosio::indexed_by<"createdat"_n, eosio::const_mem_fun< participant, uint64_t, &participant::by_created_at > >, eosio::indexed_by<"bybranch"_n, eosio::const_mem_fun< participant, uint64_t, &participant::by_braname > > > participants_index
Definition: table_soviet_participants.hpp:48