[update]: Loan Charge model

This commit is contained in:
VivianDee
2025-04-16 13:30:20 +01:00
parent 142a7eb886
commit aba5a02197
3 changed files with 11 additions and 4 deletions
+2 -1
View File
@@ -19,6 +19,7 @@ class Loan(db.Model):
transaction_id = db.Column(db.String(50), nullable=True)
account_id = db.Column(db.String(50), nullable=False)
offer_id = db.Column(db.String(20), nullable=False)
product_id = db.Column(db.String(20), nullable=False)
collection_type = db.Column(db.String(20), nullable=True)
current_loan_amount = db.Column(db.Float, nullable=True)
initial_loan_amount = db.Column(db.Float, nullable=False)
@@ -44,7 +45,7 @@ class Loan(db.Model):
)
@classmethod
def create_loan(cls, customer_id, account_id, offer_id, initial_loan_amount, collection_type, transaction_id, status='pending'):
def create_loan(cls, customer_id, account_id, offer_id, product_id, initial_loan_amount, collection_type, transaction_id, status='pending'):
# Check if customer exists
is_valid = Customer.is_valid_customer(customer_id)