4#include "../core/ram_payer.hpp"
5#include <eosio/asset.hpp>
6#include <eosio/crypto.hpp>
7#include <eosio/binary_extension.hpp>
8#include <eosio/eosio.hpp>
11#include "../consts.hpp"
12#include "../core/document.hpp"
13#include "../core/utils.hpp"
42namespace OrderStatus {
43 inline constexpr eosio::name
ACTIVE =
"active"_n;
44 inline constexpr eosio::name
ACCEPTED =
"accepted"_n;
51 inline constexpr eosio::name
RECEIVED =
"received"_n;
52 inline constexpr eosio::name
REFUSED =
"refused"_n;
69namespace OrderPayoutStatus {
70 inline constexpr eosio::name
NONE =
"none"_n;
71 inline constexpr eosio::name
PENDING =
"pending"_n;
72 inline constexpr eosio::name
COMPLETED =
"completed"_n;
73 inline constexpr eosio::name
DECLINED =
"declined"_n;
167 uint32_t warranty_period_secs = 0;
168 time_point_sec warranty_until = time_point_sec(0);
185 uint64_t return_request_id = 0;
237 checksum256
by_batch()
const {
return batch_hash; }
238 checksum256
by_offer()
const {
return offer_hash; }
243typedef eosio::multi_index<
245 eosio::indexed_by<
"byhash"_n, eosio::const_mem_fun<order, checksum256, &order::by_hash>>,
246 eosio::indexed_by<
"byorderer"_n, eosio::const_mem_fun<order, uint64_t, &order::by_orderer>>,
247 eosio::indexed_by<
"byofferer"_n, eosio::const_mem_fun<order, uint64_t, &order::by_offerer>>,
248 eosio::indexed_by<
"bystatus"_n, eosio::const_mem_fun<order, uint64_t, &order::by_status>>,
249 eosio::indexed_by<
"bybatch"_n, eosio::const_mem_fun<order, checksum256, &order::by_batch>>,
250 eosio::indexed_by<
"byoffer"_n, eosio::const_mem_fun<order, checksum256, &order::by_offer>>,
251 eosio::indexed_by<
"bydelivbra"_n, eosio::const_mem_fun<order, uint64_t, &order::by_delivery_bra>>,
252 eosio::indexed_by<
"byacceptbra"_n, eosio::const_mem_fun<order, uint64_t, &order::by_accept_bra>>>
static constexpr eosio::symbol _unit_piece
Definition: consts.hpp:243
static constexpr eosio::symbol _root_govern_symbol
Definition: consts.hpp:236
contract
Definition: eosio.msig_tests.cpp:977
constexpr eosio::name PENDING
Definition: table_marketplace_orders.hpp:71
constexpr eosio::name NONE
Definition: table_marketplace_orders.hpp:70
constexpr eosio::name COMPLETED
Definition: table_marketplace_orders.hpp:72
constexpr eosio::name DECLINED
Definition: table_marketplace_orders.hpp:73
constexpr eosio::name ACCEPTED_TO_COOP
Definition: table_marketplace_orders.hpp:46
constexpr eosio::name ACTIVE
Definition: table_marketplace_orders.hpp:43
constexpr eosio::name REFUSED
пайщик отказался после приёмки, долг поставщику ещё не погашен: запись ждёт payconfirm и стирается им
Definition: table_marketplace_orders.hpp:52
constexpr eosio::name RECEIVED
Definition: table_marketplace_orders.hpp:51
constexpr eosio::name ACCEPTED
Definition: table_marketplace_orders.hpp:44
constexpr eosio::name ISSUE_ACT1
акт подписан заказчиком, ждём закрывающую подпись председателя участка
Definition: table_marketplace_orders.hpp:50
constexpr eosio::name READY_TO_RECEIVE
Definition: table_marketplace_orders.hpp:47
constexpr eosio::name SUPPLY_PREPARED
Definition: table_marketplace_orders.hpp:45
constexpr eosio::name ISSUE_PENDING
заявление о возврате паевого взноса имуществом подано, ждём решение совета
Definition: table_marketplace_orders.hpp:48
constexpr eosio::name ISSUE_AUTHORIZED
протокол совета получен, ждём первую подпись акта заказчиком
Definition: table_marketplace_orders.hpp:49
Canonical helpers контракта marketplace (Story 11.1).
Definition: marketplace.hpp:32
eosio::multi_index< "orders"_n, order, eosio::indexed_by<"byhash"_n, eosio::const_mem_fun< order, checksum256, &order::by_hash > >, eosio::indexed_by<"byorderer"_n, eosio::const_mem_fun< order, uint64_t, &order::by_orderer > >, eosio::indexed_by<"byofferer"_n, eosio::const_mem_fun< order, uint64_t, &order::by_offerer > >, eosio::indexed_by<"bystatus"_n, eosio::const_mem_fun< order, uint64_t, &order::by_status > >, eosio::indexed_by<"bybatch"_n, eosio::const_mem_fun< order, checksum256, &order::by_batch > >, eosio::indexed_by<"byoffer"_n, eosio::const_mem_fun< order, checksum256, &order::by_offer > >, eosio::indexed_by<"bydelivbra"_n, eosio::const_mem_fun< order, uint64_t, &order::by_delivery_bra > >, eosio::indexed_by<"byacceptbra"_n, eosio::const_mem_fun< order, uint64_t, &order::by_accept_bra > > > orders_index
Definition: table_marketplace_orders.hpp:253
Definition: eosio.msig.hpp:34
Адресат перевода по Заявлению 1110: заказ и его доля перевода.
Definition: table_marketplace_orders.hpp:91
eosio::asset amount
Членская часть перевода под этот заказ
Definition: table_marketplace_orders.hpp:93
checksum256 order_hash
Хэш заказа, который оплачивает эта часть перевода
Definition: table_marketplace_orders.hpp:92
On-chain Order — анкер процесса p.mkt.supply.
Definition: table_marketplace_orders.hpp:148
eosio::name orderer
пайщик-заказчик
Definition: table_marketplace_orders.hpp:152
uint64_t by_offerer() const
Definition: table_marketplace_orders.hpp:235
eosio::binary_extension< eosio::asset > payout_withheld
Definition: table_marketplace_orders.hpp:217
checksum256 hash
process_hash для p.mkt.supply
Definition: table_marketplace_orders.hpp:150
document2 acceptance_act_signsupp
АПП приёмки — первая подпись поставщика (signsupp)
Definition: table_marketplace_orders.hpp:173
checksum256 batch_hash
opaque ссылка на consolidated request (off-chain)
Definition: table_marketplace_orders.hpp:171
eosio::binary_extension< eosio::asset > accepted_cost
Definition: table_marketplace_orders.hpp:224
eosio::name coopname
scope-валидация
Definition: table_marketplace_orders.hpp:151
checksum256 by_batch() const
Definition: table_marketplace_orders.hpp:237
eosio::binary_extension< document2 > issue_statement
Definition: table_marketplace_orders.hpp:209
eosio::binary_extension< document2 > issue_protocol
Definition: table_marketplace_orders.hpp:212
eosio::name current_warehouse_braname
текущая точка хранения; signchair: = accept_braname; readyissue: = delivery_braname (фиксация готовно...
Definition: table_marketplace_orders.hpp:158
uint64_t id
внутренний ID
Definition: table_marketplace_orders.hpp:149
eosio::name offerer
пайщик-поставщик из Offer'а (для acceptorder/declineorder/signsupp guard'а)
Definition: table_marketplace_orders.hpp:153
checksum256 by_offer() const
Definition: table_marketplace_orders.hpp:238
eosio::name accept_braname
КУ приёмки от поставщика (заполняется на signsupp); проверка signchair через Branch::is_user_authoriz...
Definition: table_marketplace_orders.hpp:157
uint64_t by_accept_bra() const
Definition: table_marketplace_orders.hpp:240
std::string payout_decline_reason
Заполняется только при payout_status == DECLINED (текст причины из gateway::outdecline)
Definition: table_marketplace_orders.hpp:183
uint64_t by_orderer() const
Definition: table_marketplace_orders.hpp:234
document2 issue_act2
Акт приёма-передачи (1115) — закрывающая подпись председателя участка выдачи (issueact2); слот прежне...
Definition: table_marketplace_orders.hpp:180
document2 issue_act1
Акт приёма-передачи (1115) — первая подпись заказчика (issueact1); слот прежнего issue_act_signiss1.
Definition: table_marketplace_orders.hpp:179
eosio::name delivery_braname
КУ выдачи (выбран пайщиком на createorder); проверка readyissue/issueact2/p.mkt.return через Branch::...
Definition: table_marketplace_orders.hpp:156
uint64_t primary_key() const
Definition: table_marketplace_orders.hpp:232
uint64_t by_delivery_bra() const
Definition: table_marketplace_orders.hpp:239
checksum256 by_hash() const
Definition: table_marketplace_orders.hpp:233
checksum256 offer_hash
ссылка на Offer (off-chain в backend)
Definition: table_marketplace_orders.hpp:154
document2 acceptance_act_signchair
АПП приёмки — финальная подпись председателя приёмного КУ (signchair)
Definition: table_marketplace_orders.hpp:174
uint64_t by_status() const
Definition: table_marketplace_orders.hpp:236
Definition: table_registrator_orgs.hpp:17
Definition: document_core.hpp:27
RAM_PAYER_CLASS(Marketplace::order, cooperative)