added return data
This commit is contained in:
@@ -123,6 +123,8 @@ class LoanService:
|
||||
'id': loan.id,
|
||||
'customer_id': loan.customer_id,
|
||||
'account_id': loan.account_id,
|
||||
'transaction_id': loan.transaction_id,
|
||||
'original_transaction': loan.original_transaction,
|
||||
'offer_id': loan.offer_id,
|
||||
'initial_loan_amount': loan.initial_loan_amount,
|
||||
'current_loan_amount': loan.current_loan_amount,
|
||||
@@ -130,6 +132,9 @@ class LoanService:
|
||||
'product_id': loan.product_id,
|
||||
'default_penalty_fee': loan.default_penalty_fee,
|
||||
'continuous_fee': loan.continuous_fee,
|
||||
'upfront_fee': self.upfront_fee,
|
||||
'repayment_amount': self.repayment_amount,
|
||||
'installment_amount': self.installment_amount,
|
||||
'due_date': loan.due_date.isoformat() if loan.due_date else None,
|
||||
'created_at': loan.created_at.isoformat() if loan.created_at else None,
|
||||
'updated_at': loan.updated_at.isoformat() if loan.updated_at else None
|
||||
|
||||
+1
-1
@@ -222,6 +222,6 @@ class Loan(db.Model):
|
||||
'created_at': self.created_at.isoformat() if self.created_at else None,
|
||||
'updated_at': self.updated_at.isoformat() if self.updated_at else None
|
||||
}
|
||||
|
||||
|
||||
def __repr__(self):
|
||||
return f'<Loan {self.id}>'
|
||||
Reference in New Issue
Block a user