BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
29 #include <boost/multi_index/composite_key.hpp>
31 namespace graphene {
namespace chain {
59 struct by_auto_disable_time;
69 ordered_unique< tag<by_id>, member< object, object_id_type, &object::id > >,
70 ordered_unique< tag<by_auto_disable_time>,
72 member< credit_offer_object, bool, &credit_offer_object::enabled >,
73 member< credit_offer_object, time_point_sec, &credit_offer_object::auto_disable_time >,
74 member< object, object_id_type, &object::id>
77 ordered_unique< tag<by_owner>,
79 member< credit_offer_object, account_id_type, &credit_offer_object::owner_account >,
80 member< object, object_id_type, &object::id>
83 ordered_unique< tag<by_asset_type>,
85 member< credit_offer_object, asset_id_type, &credit_offer_object::asset_type >,
86 member< object, object_id_type, &object::id>
119 struct by_latest_repay_time;
121 struct by_offer_owner;
123 struct by_debt_asset;
124 struct by_collateral_asset;
132 ordered_unique< tag<by_id>, member< object, object_id_type, &object::id > >,
133 ordered_unique< tag<by_latest_repay_time>,
135 member< credit_deal_object, time_point_sec, &credit_deal_object::latest_repay_time >,
136 member< object, object_id_type, &object::id>
139 ordered_unique< tag<by_offer_id>,
141 member< credit_deal_object, credit_offer_id_type, &credit_deal_object::offer_id >,
142 member< object, object_id_type, &object::id>
145 ordered_unique< tag<by_offer_owner>,
147 member< credit_deal_object, account_id_type, &credit_deal_object::offer_owner >,
148 member< object, object_id_type, &object::id>
151 ordered_unique< tag<by_borrower>,
153 member< credit_deal_object, account_id_type, &credit_deal_object::borrower >,
154 member< object, object_id_type, &object::id>
157 ordered_unique< tag<by_debt_asset>,
159 member< credit_deal_object, asset_id_type, &credit_deal_object::debt_asset >,
160 member< object, object_id_type, &object::id>
163 ordered_unique< tag<by_collateral_asset>,
165 member< credit_deal_object, asset_id_type, &credit_deal_object::collateral_asset >,
166 member< object, object_id_type, &object::id>
185 implementation_ids, impl_credit_deal_summary_object_type>
195 struct by_offer_borrower;
203 ordered_unique< tag<by_id>, member< object, object_id_type, &object::id > >,
204 ordered_unique< tag<by_offer_borrower>,
206 member< credit_deal_summary_object, credit_offer_id_type, &credit_deal_summary_object::offer_id >,
207 member< credit_deal_summary_object, account_id_type, &credit_deal_summary_object::borrower >
share_type collateral_amount
How much funds in collateral.
A credit deal describes the details of a borrower's borrowing of funds from a credit offer.
A credit offer is a fund that can be used by other accounts who provide certain collateral.
share_type total_balance
Total size of the fund.
asset_id_type asset_type
Asset type in the fund.
account_id_type offer_owner
Owner of the credit offer, redundant info for ease of querying.
FC_REFLECT_TYPENAME(fc::log_message)
share_type total_debt_amount
How much funds borrowed.
#define MAP_OBJECT_ID_TO_TYPE(OBJECT)
account_id_type owner_account
Owner of the fund.
multi_index_container< credit_offer_object, indexed_by< ordered_unique< tag< by_id >, member< object, object_id_type, &object::id > >, ordered_unique< tag< by_auto_disable_time >, composite_key< credit_offer_object, member< credit_offer_object, bool, &credit_offer_object::enabled >, member< credit_offer_object, time_point_sec, &credit_offer_object::auto_disable_time >, member< object, object_id_type, &object::id > > >, ordered_unique< tag< by_owner >, composite_key< credit_offer_object, member< credit_offer_object, account_id_type, &credit_offer_object::owner_account >, member< object, object_id_type, &object::id > > >, ordered_unique< tag< by_asset_type >, composite_key< credit_offer_object, member< credit_offer_object, asset_id_type, &credit_offer_object::asset_type >, member< object, object_id_type, &object::id > > > > > credit_offer_multi_index_type
multi_index_container< credit_deal_object, indexed_by< ordered_unique< tag< by_id >, member< object, object_id_type, &object::id > >, ordered_unique< tag< by_latest_repay_time >, composite_key< credit_deal_object, member< credit_deal_object, time_point_sec, &credit_deal_object::latest_repay_time >, member< object, object_id_type, &object::id > > >, ordered_unique< tag< by_offer_id >, composite_key< credit_deal_object, member< credit_deal_object, credit_offer_id_type, &credit_deal_object::offer_id >, member< object, object_id_type, &object::id > > >, ordered_unique< tag< by_offer_owner >, composite_key< credit_deal_object, member< credit_deal_object, account_id_type, &credit_deal_object::offer_owner >, member< object, object_id_type, &object::id > > >, ordered_unique< tag< by_borrower >, composite_key< credit_deal_object, member< credit_deal_object, account_id_type, &credit_deal_object::borrower >, member< object, object_id_type, &object::id > > >, ordered_unique< tag< by_debt_asset >, composite_key< credit_deal_object, member< credit_deal_object, asset_id_type, &credit_deal_object::debt_asset >, member< object, object_id_type, &object::id > > >, ordered_unique< tag< by_collateral_asset >, composite_key< credit_deal_object, member< credit_deal_object, asset_id_type, &credit_deal_object::collateral_asset >, member< object, object_id_type, &object::id > > > > > credit_deal_multi_index_type
flat_map< asset_id_type, price > acceptable_collateral
Types and rates of acceptable collateral.
bool enabled
Whether this offer is available.
credit_offer_id_type offer_id
ID of the credit offer.
uint32_t fee_rate
Fee rate, the demominator is GRAPHENE_FEE_RATE_DENOM.
account_id_type borrower
Borrower.
uint8_t auto_repay
The specified automatic repayment type.
A credit deal summary describes the summary of a borrower's borrowing of funds from a credit offer.
#define GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION(type)
asset_id_type debt_asset
Asset type of the debt, redundant info for ease of querying.
multi_index_container< credit_deal_summary_object, indexed_by< ordered_unique< tag< by_id >, member< object, object_id_type, &object::id > >, ordered_unique< tag< by_offer_borrower >, composite_key< credit_deal_summary_object, member< credit_deal_summary_object, credit_offer_id_type, &credit_deal_summary_object::offer_id >, member< credit_deal_summary_object, account_id_type, &credit_deal_summary_object::borrower > > > > > credit_deal_summary_index_type
account_id_type borrower
Borrower.
time_point_sec auto_disable_time
The time when this offer will be disabled automatically.
credit_offer_id_type offer_id
ID of the credit offer.
share_type debt_amount
How much funds borrowed.
asset_id_type debt_asset
Asset type of the debt, redundant info for ease of querying.
flat_map< account_id_type, share_type > acceptable_borrowers
Allowed borrowers and their maximum amounts to borrow. No limitation if empty.
uint32_t fee_rate
Fee rate, the demominator is GRAPHENE_FEE_RATE_DENOM.
time_point_sec latest_repay_time
The deadline when the debt should be repaid.
asset_id_type collateral_asset
Asset type of the collateral.
uint32_t max_duration_seconds
The time limit that borrowed funds should be repaid.
account_id_type offer_owner
Owner of the credit offer, redundant info for ease of querying.
share_type current_balance
Usable amount in the fund.
share_type min_deal_amount
Minimum amount to borrow for each new deal.