this is my table
struct [[eosio::table]] payment_made
{
uint64_t pay_id;
uint64_t loan_id;
uint64_t pay_amunt;
time_point_sec pay_date_req;
time_point_sec pay_date_approve;
bool payment_status= false;
// name pay_from;
uint64_t primary_key() const
{
return pay_id;
}
uint64_t by_loanId() const
{
return loan_id;
}
};
typedef eosio::multi_index<"paymentmade"_n, payment_made,
indexed_by<"loanid"_n, const_mem_fun<payment_made, uint64_t, &payment_made::by_loanId>>>paymentmade;
paymentmade paymade_table;
Here my loan_id is Secondary multi-indexed key
Here i want to modify my table,for that i will need the private key of the table so,i want to get the private key of table with the help of secondary key please help?
I want to modify
pay_date_approve and payment_status in this function and the only argument is getting passed is loan_id which secondary key of the table,so can we do this ?
void mainloan::payconfirm(uint64_t loan_id)
{
auto pridx = paymade_table.get_index<N(loanid)>();
}