Skip to content

Part 10 — System Blueprint

Domain Model Lending

The lending model starts when a lead becomes an application and ends only after the loan, collateral, charges, regulatory reports and post-closure document release are complete. It deliberately separates origination records from live account records. The LOS can propose terms; the LMS owns booked terms, dues, receipts, DPD, SMA/NPA and closure.

Types use PostgreSQL conventions. Money is numeric(18,2), rates are annual decimal percentages in numeric(9,6), dates that affect interest or DPD are date, and operational timestamps are timestamptz. Every table has standard audit fields: created_at, created_by, updated_at, updated_by, version, and an immutable audit_event_id for material changes. They are omitted below.

FieldTypeConstraintsNullableReferences
application_iduuidPrimary keyNoNone
application_numbertextUnique human-readable idNoNone
lead_iduuidRequired when originated from CRMYeslead.lead_id
product_codetextActive product masterNoproduct.product_code
product_variant_codetextVariant or programYesproduct_variant.code
channel_typeenumbranch, dsa, connector, digital_direct, lsp, anchor, co_lending, renewal, top_upNoNone
source_partner_iduuidRequired for DSA/LSP/anchor/co-lending channelYesparty.party_id
primary_applicant_party_iduuidMust have application role primary_applicantNoparty.party_id
requested_amountnumeric(18,2)Greater than 0NoNone
requested_tenor_monthsintGreater than 0YesNone
requested_purposeenumworking_capital, business_expansion, machinery, invoice_finance, lap, debt_consolidation, top_up, other_businessNoNone
application_stateenumSee state machinesNoNone
state_effective_attimestamptzRequiredNoNone
assigned_branch_codetextRequired for branchable productsYesbranch.branch_code
assigned_rm_iduuidSales ownerYesuser.user_id
co_lending_flagbooleanDefault falseNoNone
digital_lending_flagbooleanDefault false; true for DLA/LSP digital journeyNoNone
withdrawal_reason_codetextRequired when withdrawnYesreason_code.code
reject_reason_codetextRequired when rejectedYesreason_code.code
FieldTypeConstraintsNullableReferences
credit_assessment_iduuidPrimary keyNoNone
application_iduuidOne active assessment per application versionNoapplication.application_id
assessment_versionintStarts at 1; increments on material refreshNoNone
financial_methodenumaudited_financials, itr, gst_surrogate, banking_surrogate, cash_flow, anchor_data, scorecard_only, manual_hybridNoNone
annual_turnover_assessednumeric(18,2)Non-negativeYesNone
monthly_income_assessednumeric(18,2)Non-negativeYesNone
foir_percentnumeric(9,6)0-100YesNone
dscrnumeric(9,4)Greater than 0 when computedYesNone
abb_6mnumeric(18,2)Average bank balanceYesNone
bureau_scoreintBureau range or null for no-hitYesNone
commercial_ranktextCMR or equivalentYesNone
internal_risk_gradetextGrade masterNorisk_grade.code
recommended_amountnumeric(18,2)Greater than or equal to 0NoNone
recommended_tenor_monthsintGreater than 0 when approved/recommendedYesNone
recommended_ratenumeric(9,6)Annual reducing rateYesNone
recommendationenumapprove, approve_with_conditions, reject, refer, deferNoNone
cam_document_iduuidFrozen CAMYesdocument_instance.document_id
FieldTypeConstraintsNullableReferences
bre_result_iduuidPrimary keyNoNone
application_iduuidApplication evaluatedNoapplication.application_id
rule_set_iduuidRule setNorule_set.rule_set_id
rule_version_iduuidImmutable versionNorule_version.rule_version_id
execution_typeenumprescreen, eligibility, pricing, deviation, renewal, monitoringNoNone
decisionenumpass, fail, refer, manual_review, errorNoNone
max_eligible_amountnumeric(18,2)Non-negativeYesNone
max_tenor_monthsintPositiveYesNone
price_floor_ratenumeric(9,6)Annual rateYesNone
result_jsonjsonbFull rule treeNoNone
executed_attimestamptzRequiredNoNone
FieldTypeConstraintsNullableReferences
deviation_iduuidPrimary keyNoNone
application_iduuidApplication contextNoapplication.application_id
deviation_typeenumpolicy, pricing, documentation, kyc, collateral, financial, bureau, geography, exposure, process, regulatoryNoNone
rule_codetextRule breachedNopolicy_rule.code
severityenumlow, medium, high, criticalNoNone
descriptiontextSpecific breachNoNone
mitiganttextRequired before approvalYesNone
statusenumraised, approved, rejected, withdrawn, expiredNoNone
required_authority_leveltextResolved DoA levelNoauthority_level.code
approved_byuuidRequired when approvedYesuser.user_id
approved_attimestamptzRequired when approved/rejectedYesNone
FieldTypeConstraintsNullableReferences
sanction_iduuidPrimary keyNoNone
application_iduuidOne or more versions per applicationNoapplication.application_id
sanction_numbertextUniqueNoNone
sanction_versionintStarts at 1NoNone
sanction_statusenumdraft, pending_approval, approved, approved_with_modification, rejected, deferred, expired, accepted, cancelledNoNone
sanctioned_amountnumeric(18,2)Greater than 0 when approvedYesNone
tenor_monthsintPositive when approvedYesNone
interest_rate_typeenumfixed, floating, hybrid, discount, cash_creditNoNone
annual_interest_ratenumeric(9,6)Annual reducing or equivalentYesNone
apr_percentnumeric(9,6)Required for KFS-covered loans; computed, not manually typedYesNone
repayment_frequencyenumdaily, weekly, fortnightly, monthly, quarterly, bullet, on_demand, revolvingNoNone
emi_amountnumeric(18,2)Required for EMI productsYesNone
valid_untildateMust be after approval dateYesNone
approval_authority_iduuidResolved authorityYesapproval_authority.authority_id
kfs_version_iduuidRequired for covered retail/MSME term loans under RBI KFS circularYeskfs_version.kfs_version_id
borrower_acceptance_attimestamptzRequired when acceptedYesNone
FieldTypeConstraintsNullableReferences
condition_iduuidPrimary keyNoNone
sanction_iduuidParent sanctionNosanction.sanction_id
condition_typeenumcondition_precedent, condition_subsequent, covenant, monitoring_requirement, disbursement_condition, documentation_conditionNoNone
condition_codetextControlled library where possibleNocondition_master.code
condition_texttextBorrower/ops-readable textNoNone
owner_roletextRole responsible for closureNorole.role_code
due_datedateRequired for CS/covenant/monitoring conditionYesNone
blocks_disbursementbooleanTrue for CPsNoNone
statusenumopen, submitted, verified, waiver_requested, waived, breached, closedNoNone
closure_evidence_document_iduuidRequired for verified closure where evidence existsYesdocument_instance.document_id
waiver_deviation_iduuidRequired when waivedYesdeviation.deviation_id
FieldTypeConstraintsNullableReferences
loan_account_iduuidPrimary keyNoNone
loan_account_numbertextUnique customer-facing account numberNoNone
application_iduuidOriginating applicationNoapplication.application_id
sanction_iduuidAccepted sanctionNosanction.sanction_id
borrower_party_iduuidLegal borrowerNoparty.party_id
product_codetextProduct bookedNoproduct.product_code
booking_datedateLMS booking dateNoNone
first_disbursement_datedateRequired after first disbursementYesNone
maturity_datedateRequired for term loansYesNone
account_stateenumSee state machinesNoNone
principal_sanctionednumeric(18,2)Greater than 0NoNone
principal_disbursednumeric(18,2)0 to sanctioned amountNoNone
principal_outstandingnumeric(18,2)Non-negativeNoNone
interest_rate_typeenumfixed, floating, hybrid, discount, cash_creditNoNone
current_annual_ratenumeric(9,6)Required for interest-bearing facilitiesYesNone
repayment_frequencyenumdaily, weekly, fortnightly, monthly, quarterly, bullet, on_demand, revolvingNoNone
current_dpdintComputed; non-negativeNoNone
asset_classificationenumstandard, sma_0, sma_1, sma_2, npa_substandard, npa_doubtful_1, npa_doubtful_2, npa_doubtful_3, lossNoNone
classification_effective_datedateRequiredNoNone
co_lending_account_flagbooleanDefault falseNoNone
closure_datedateRequired when closed/preclosed/written off closureYesNone
FieldTypeConstraintsNullableReferences
facility_iduuidPrimary keyNoNone
loan_account_iduuidParent accountNoloan_account.loan_account_id
facility_typeenumterm_loan, cash_credit, overdraft, invoice_discounting, dealer_finance, guarantee, letter_of_credit, machinery_loan, lapNoNone
limit_amountnumeric(18,2)Greater than 0NoNone
drawing_power_amountnumeric(18,2)Required for CC/OD and receivable-backed productsYesNone
limit_expiry_datedateRequired for revolving/working-capital limitsYesNone
review_due_datedateRequired for working-capital renewalYesNone
available_amountnumeric(18,2)Non-negativeYesNone
facility_stateenumapproved, available, frozen, expired, recalled, closedNoNone
FieldTypeConstraintsNullableReferences
disbursement_iduuidPrimary keyNoNone
loan_account_iduuidTarget accountNoloan_account.loan_account_id
tranche_numberintStarts at 1NoNone
disbursement_amountnumeric(18,2)Greater than 0NoNone
beneficiary_typeenumborrower, supplier, dealer, invoice_seller, escrow, statutory_authorityNoNone
beneficiary_party_iduuidRequired for non-borrower beneficiaryYesparty.party_id
beneficiary_bank_account_iduuidVerified bank accountNobank_account.bank_account_id
disbursement_datedateValue dateNoNone
payment_referencetextBank/UPI/NEFT/RTGS referenceYesNone
statusenuminitiated, posted, failed, reversed, cancelledNoNone
failure_reason_codetextRequired when failedYesreason_code.code
FieldTypeConstraintsNullableReferences
schedule_version_iduuidPrimary keyNoNone
loan_account_iduuidParent loanNoloan_account.loan_account_id
version_numberintStarts at 1NoNone
schedule_typeenumoriginal, rate_reset, part_prepayment, moratorium, restructure, correction, settlementNoNone
effective_fromdateRequiredNoNone
effective_todateNull for active scheduleYesNone
generated_by_event_iduuidEvent that created versionNoaudit_event.audit_event_id
statusenumdraft, active, superseded, cancelledNoNone
FieldTypeConstraintsNullableReferences
due_iduuidPrimary keyNoNone
schedule_version_iduuidScheduleNoschedule_version.schedule_version_id
loan_account_iduuidParent loanNoloan_account.loan_account_id
installment_numberintPositive for installment productsYesNone
due_datedateContractual due dateNoNone
principal_duenumeric(18,2)Non-negativeNoNone
interest_duenumeric(18,2)Non-negativeNoNone
charge_duenumeric(18,2)Non-negativeNoNone
tax_duenumeric(18,2)Non-negativeNoNone
total_duenumeric(18,2)Sum of componentsNoNone
amount_paidnumeric(18,2)Non-negative and not above total unless overpayment allocatedNoNone
due_statusenumfuture, presented, part_paid, paid, overdue, waived, reversedNoNone
paid_datedateRequired when paidYesNone
FieldTypeConstraintsNullableReferences
loan_transaction_iduuidPrimary keyNoNone
loan_account_iduuidParent loanNoloan_account.loan_account_id
transaction_typeenumdisbursement, demand, receipt, bounce, charge, tax, waiver, refund, reversal, interest_accrual, interest_reversal, write_off, recovery_after_writeoff, foreclosureNoNone
value_datedateAccounting value dateNoNone
posting_timestamptimestamptzSystem posting timeNoNone
amountnumeric(18,2)Positive; sign comes from type and accounting ruleNoNone
principal_componentnumeric(18,2)Non-negativeNoNone
interest_componentnumeric(18,2)Non-negativeNoNone
charge_componentnumeric(18,2)Non-negativeNoNone
tax_componentnumeric(18,2)Non-negativeNoNone
payment_modeenumnach, enach, upi, neft, rtgs, cash, cheque, payment_gateway, escrow, adjustment, not_applicableNoNone
external_referencetextBank/payment reference where presentYesNone
reversal_of_transaction_iduuidRequired for reversalYesloan_transaction.loan_transaction_id
statusenumpending, posted, reversed, failed, cancelledNoNone
FieldTypeConstraintsNullableReferences
allocation_iduuidPrimary keyNoNone
receipt_transaction_iduuidReceipt being allocatedNoloan_transaction.loan_transaction_id
due_iduuidDue being clearedYesrepayment_due.due_id
componentenumprincipal, interest, charge, tax, legal_cost, excessNoNone
amount_allocatednumeric(18,2)Greater than 0NoNone
allocation_orderintShows appropriation sequenceNoNone
rule_version_iduuidAppropriation rule usedNorule_version.rule_version_id
FieldTypeConstraintsNullableReferences
collateral_iduuidPrimary keyNoNone
application_iduuidOriginal applicationYesapplication.application_id
loan_account_iduuidLinked after bookingYesloan_account.loan_account_id
collateral_typeenumresidential_property, commercial_property, industrial_property, land, machinery, vehicle_equipment, stock, book_debt, invoice, fixed_deposit, guarantee, other_movableNoNone
descriptiontextSpecific asset descriptionNoNone
address_iduuidRequired for immovable property and asset locationYesaddress.address_id
asset_identifiertextSurvey no, serial no, invoice no, policy noYesNone
declared_valuenumeric(18,2)Non-negativeYesNone
eligible_valuenumeric(18,2)Lower of policy/valuation valuesYesNone
latest_valuation_iduuidRequired when valuedYesvaluation_report.valuation_id
insurance_policy_iduuidRequired where insurance is conditionYesinsurance_policy.insurance_policy_id
collateral_statusenumproposed, documents_pending, under_legal_review, under_valuation, approved, approved_with_conditions, rejected, charged, releasedNoNone
FieldTypeConstraintsNullableReferences
valuation_iduuidPrimary keyNoNone
collateral_iduuidValued assetNocollateral_asset.collateral_id
valuer_party_iduuidEmpanelled valuerNoparty.party_id
inspection_datedateRequiredNoNone
market_valuenumeric(18,2)Non-negativeNoNone
realizable_valuenumeric(18,2)Non-negativeYesNone
distress_sale_valuenumeric(18,2)Non-negativeYesNone
valuation_methodenummarket_comparable, cost, income, circle_rate, invoice_cost, engineer_estimate, hybridNoNone
report_document_iduuidReport fileNodocument_instance.document_id
statusenumdraft, submitted, accepted, rework, rejected, expiredNoNone
FieldTypeConstraintsNullableReferences
security_charge_iduuidPrimary keyNoNone
loan_account_iduuidSecured loan accountNoloan_account.loan_account_id
collateral_iduuidCharged assetNocollateral_asset.collateral_id
charge_typeenumhypothecation, equitable_mortgage, registered_mortgage, pledge, assignment, lien, guarantee, negative_lienNoNone
charge_rankenumexclusive_first, pari_passu_first, second, subservient, unsecured_supportNoNone
charge_amountnumeric(18,2)Greater than 0NoNone
created_datedateDate of security creationNoNone
perfection_statusenumpending, created, cersai_pending, roc_pending, perfected, exception_approved, satisfied, releasedNoNone
cersai_filing_iduuidRequired where CERSAI filing appliesYescersai_filing.cersai_filing_id
roc_charge_filing_iduuidRequired for company borrower charge where Companies Act filing appliesYesroc_charge_filing.roc_charge_filing_id
release_datedateRequired when released/satisfiedYesNone
FieldTypeConstraintsNullableReferences
mandate_iduuidPrimary keyNoNone
loan_account_iduuidParent loanNoloan_account.loan_account_id
party_iduuidBank account ownerNoparty.party_id
bank_account_iduuidDebit accountNobank_account.bank_account_id
mandate_typeenumphysical_nach, enach, upi_autopay, standing_instruction, post_dated_chequeNoNone
umrntextRequired for registered NACH/eNACHYesNone
max_amountnumeric(18,2)Greater than or equal to EMI or policy amountNoNone
frequencyenumdaily, weekly, fortnightly, monthly, quarterly, ad_hocNoNone
start_datedateRequiredNoNone
end_datedateAfter start dateNoNone
mandate_statusenumcreated, submitted, accepted, active, rejected, suspended, cancelled, expiredNoNone
rejection_reason_codetextRequired when rejectedYesreason_code.code
EntityRequired fieldsBuild rule
co_lending_arrangementcla_id, originating_re_party_id, partner_re_party_id, product_scope, originator_share_percent, partner_share_percent, effective_date, escrow_bank_account_id, customer_interface_party_id, statusEach RE share must be at least 10 percent under RBI CLA Directions, 2025.
partner_sharepartner_share_id, loan_account_id, cla_id, re_party_id, share_percent, principal_share, interest_rate, booked_at, statusShare must be booked without delay and no later than 15 calendar days from originator disbursement under RBI CLA Directions, 2025.
escrow_movementmovement_id, loan_account_id, escrow_account_id, movement_type, amount, value_date, originating_re_amount, partner_re_amount, reconciliation_statusAll CLA disbursement and repayment movements must route through bank escrow.
dlg_setdlg_set_id, provider_party_id, beneficiary_re_party_id, portfolio_identifier, upfront_portfolio_amount, cap_amount, form, valid_from, valid_to, statusCap must not exceed 5 percent of the fixed DLG loan portfolio under RBI Digital Lending Directions.