COOPENOMICS  v1
Кооперативная Экономика
Пространство имен Marketplace

Пространства имен

namespace  DocumentNames
 Константы для имен документов маркетплейса (максимум 12 символов)
 

Классы

struct  request
 Таблица обменов для контракта "marketplace". Подробнее...
 
struct  segment
 Сегмент поставки - унифицированная структура для работы с документами Подробнее...
 
struct  shipment
 Перевозка имущества - объединение нескольких заявок в одну транспортную накладную Подробнее...
 

Определения типов

typedef eosio::multi_index< "segments"_n, segment, eosio::indexed_by<"byrequest"_n, eosio::const_mem_fun< segment, uint64_t, &segment::by_request > >, eosio::indexed_by<"bytype"_n, eosio::const_mem_fun< segment, uint64_t, &segment::by_type > >, eosio::indexed_by<"bystatus"_n, eosio::const_mem_fun< segment, uint64_t, &segment::by_status > > > segments_index
 
typedef eosio::multi_index< "shipments"_n, shipment, eosio::indexed_by<"byhash"_n, eosio::const_mem_fun< shipment, checksum256, &shipment::by_hash > >, eosio::indexed_by<"bycoop"_n, eosio::const_mem_fun< shipment, uint64_t, &shipment::by_coop > >, eosio::indexed_by<"bydriver"_n, eosio::const_mem_fun< shipment, uint64_t, &shipment::by_driver > >, eosio::indexed_by<"bysource"_n, eosio::const_mem_fun< shipment, uint64_t, &shipment::by_source > >, eosio::indexed_by<"bydest"_n, eosio::const_mem_fun< shipment, uint64_t, &shipment::by_destination > >, eosio::indexed_by<"bystatus"_n, eosio::const_mem_fun< shipment, uint64_t, &shipment::by_status > >, eosio::indexed_by<"bycreated"_n, eosio::const_mem_fun< shipment, uint64_t, &shipment::by_created > > > shipments_index
 
typedef eosio::multi_index< "requests"_n, request, eosio::indexed_by<"bycoop"_n, eosio::const_mem_fun< request, uint64_t, &request::by_coop > >, eosio::indexed_by<"bystatus"_n, eosio::const_mem_fun< request, uint64_t, &request::by_status > >, eosio::indexed_by<"bytype"_n, eosio::const_mem_fun< request, uint64_t, &request::by_type > >, eosio::indexed_by<"byhash"_n, eosio::const_mem_fun< request, checksum256, &request::by_hash > >, eosio::indexed_by<"byusername"_n, eosio::const_mem_fun< request, uint64_t, &request::by_username > >, eosio::indexed_by<"bycreated"_n, eosio::const_mem_fun< request, uint64_t, &request::by_created > >, eosio::indexed_by<"bycompleted"_n, eosio::const_mem_fun< request, uint64_t, &request::by_completed > >, eosio::indexed_by<"bydeclined"_n, eosio::const_mem_fun< request, uint64_t, &request::by_declined > >, eosio::indexed_by<"bycanceled"_n, eosio::const_mem_fun< request, uint64_t, &request::by_canceled > >, eosio::indexed_by<"bywarrantyid"_n, eosio::const_mem_fun< request, uint64_t, &request::by_warranty_id > > > requests_index
 

Функции

eosio::name get_valid_marketplace_action (const eosio::name &action)
 
static std::optional< requestget_request_by_hash (eosio::name coopname, checksum256 request_hash)
 
static std::optional< shipmentget_shipment_by_hash (eosio::name coopname, checksum256 shipment_hash)
 
static request get_request_by_hash_or_fail (eosio::name coopname, checksum256 request_hash, const std::string &error_msg="Заявка не найдена по хэшу")
 
static shipment get_shipment_by_hash_or_fail (eosio::name coopname, checksum256 shipment_hash, const std::string &error_msg="Перевозка не найдена по хэшу")
 

Переменные

static const std::set< eosio::name > marketplace_callback_actions
 

Типы

◆ requests_index

typedef eosio::multi_index< "requests"_n, request, eosio::indexed_by<"bycoop"_n, eosio::const_mem_fun<request, uint64_t, &request::by_coop> >, eosio::indexed_by<"bystatus"_n, eosio::const_mem_fun<request, uint64_t, &request::by_status> >, eosio::indexed_by<"bytype"_n, eosio::const_mem_fun<request, uint64_t, &request::by_type> >, eosio::indexed_by<"byhash"_n, eosio::const_mem_fun<request, checksum256, &request::by_hash> >, eosio::indexed_by<"byusername"_n, eosio::const_mem_fun<request, uint64_t, &request::by_username> >, eosio::indexed_by<"bycreated"_n, eosio::const_mem_fun<request, uint64_t, &request::by_created> >, eosio::indexed_by<"bycompleted"_n, eosio::const_mem_fun<request, uint64_t, &request::by_completed> >, eosio::indexed_by<"bydeclined"_n, eosio::const_mem_fun<request, uint64_t, &request::by_declined> >, eosio::indexed_by<"bycanceled"_n, eosio::const_mem_fun<request, uint64_t, &request::by_canceled> >, eosio::indexed_by<"bywarrantyid"_n, eosio::const_mem_fun<request, uint64_t, &request::by_warranty_id> >> Marketplace::requests_index

◆ segments_index

typedef eosio::multi_index< "segments"_n, segment, eosio::indexed_by<"byrequest"_n, eosio::const_mem_fun<segment, uint64_t, &segment::by_request> >, eosio::indexed_by<"bytype"_n, eosio::const_mem_fun<segment, uint64_t, &segment::by_type> >, eosio::indexed_by<"bystatus"_n, eosio::const_mem_fun<segment, uint64_t, &segment::by_status> >> Marketplace::segments_index

◆ shipments_index

typedef eosio::multi_index< "shipments"_n, shipment, eosio::indexed_by<"byhash"_n, eosio::const_mem_fun<shipment, checksum256, &shipment::by_hash> >, eosio::indexed_by<"bycoop"_n, eosio::const_mem_fun<shipment, uint64_t, &shipment::by_coop> >, eosio::indexed_by<"bydriver"_n, eosio::const_mem_fun<shipment, uint64_t, &shipment::by_driver> >, eosio::indexed_by<"bysource"_n, eosio::const_mem_fun<shipment, uint64_t, &shipment::by_source> >, eosio::indexed_by<"bydest"_n, eosio::const_mem_fun<shipment, uint64_t, &shipment::by_destination> >, eosio::indexed_by<"bystatus"_n, eosio::const_mem_fun<shipment, uint64_t, &shipment::by_status> >, eosio::indexed_by<"bycreated"_n, eosio::const_mem_fun<shipment, uint64_t, &shipment::by_created> >> Marketplace::shipments_index

Функции

◆ get_request_by_hash()

static std::optional< request > Marketplace::get_request_by_hash ( eosio::name  coopname,
checksum256  request_hash 
)
static

◆ get_request_by_hash_or_fail()

static request Marketplace::get_request_by_hash_or_fail ( eosio::name  coopname,
checksum256  request_hash,
const std::string &  error_msg = "Заявка не найдена по хэшу" 
)
static

◆ get_shipment_by_hash()

static std::optional< shipment > Marketplace::get_shipment_by_hash ( eosio::name  coopname,
checksum256  shipment_hash 
)
static

◆ get_shipment_by_hash_or_fail()

static shipment Marketplace::get_shipment_by_hash_or_fail ( eosio::name  coopname,
checksum256  shipment_hash,
const std::string &  error_msg = "Перевозка не найдена по хэшу" 
)
static

◆ get_valid_marketplace_action()

eosio::name Marketplace::get_valid_marketplace_action ( const eosio::name &  action)
inline

Переменные

◆ marketplace_callback_actions

const std::set<eosio::name> Marketplace::marketplace_callback_actions
static
Инициализатор
= {
"authoffs2c"_n,
"authoffc2r"_n,
"authordcont"_n,
"authordret"_n,
"declineacc"_n,
}