-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.py
More file actions
122 lines (118 loc) · 5.7 KB
/
Copy pathdata.py
File metadata and controls
122 lines (118 loc) · 5.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
LOAN_PRODUCTS = [
{
"id": "hdfc_business_term_loan",
"name_key": "hdfc_business_term_loan",
"bank_name": "HDFC Bank",
"interest_rate": "10.75% p.a. onwards",
"max_amount": 500_000_000,
"description": "Unsecured term loan for working capital, business expansion, machinery purchase, inventory, marketing, and similar business needs.",
"purpose": "Working capital, business expansion, machinery purchase, inventory, marketing, and related business requirements.",
"typical_amount": "Business term loan exposure can go up to Rs.50 crore for eligible business borrowers.",
"tenure_text": "Up to 60 months (5 years).",
"tenure_months": 60,
"features": [
"No collateral or guarantor required for eligible borrowers.",
"Quick eligibility check and relatively fast disbursal.",
"Fixed EMIs suitable for stable cash-flow businesses.",
],
"required_documents": [
{"name": "Bank statements", "allowed_types": ["pdf", "xls", "xlsx", "csv"], "mandatory": True},
{"name": "Business PAN / KYC docs", "allowed_types": ["pdf", "jpg", "jpeg", "png"], "mandatory": True},
{"name": "ITR filing", "allowed_types": ["pdf"], "mandatory": False},
{"name": "Balance sheet", "allowed_types": ["pdf", "xls", "xlsx", "csv"], "mandatory": False},
{"name": "PL statement", "allowed_types": ["pdf", "xls", "xlsx", "csv"], "mandatory": False},
{"name": "GST returns", "allowed_types": ["pdf", "xls", "xlsx", "csv"], "mandatory": False},
],
},
{
"id": "hdfc_business_od",
"name_key": "hdfc_business_od",
"bank_name": "HDFC Bank",
"interest_rate": "Interest charged on utilised amount; unsecured OD limits typically up to Rs.25 lakh for this facility.",
"max_amount": 1_000_000_000,
"description": "Working-capital overdraft facility for daily business expenses, stock purchase, receivables management, and seasonal cash-flow gaps.",
"purpose": "Flexible working capital for day-to-day expenses, stock purchase, receivable cycles, and seasonal cash-flow gaps.",
"typical_amount": "Working-capital or OD exposure can extend up to Rs.100 crore for suitable business profiles.",
"tenure_text": "Up to 60 months (5 years) for longer business repayment cycles.",
"tenure_months": 60,
"features": [
"Interest is generally charged only on the utilised amount.",
"Good for businesses with fluctuating cash flows.",
"Can be linked to a current account for easy withdrawals and repayments.",
"May require more supporting documentation than a pure term loan.",
],
"required_documents": [
{"name": "Bank statements", "allowed_types": ["pdf", "xls", "xlsx", "csv"], "mandatory": True},
{"name": "Business PAN / KYC docs", "allowed_types": ["pdf", "jpg", "jpeg", "png"], "mandatory": True},
{"name": "ITR filing", "allowed_types": ["pdf"], "mandatory": False},
{"name": "Balance sheet", "allowed_types": ["pdf", "xls", "xlsx", "csv"], "mandatory": False},
{"name": "PL statement", "allowed_types": ["pdf", "xls", "xlsx", "csv"], "mandatory": False},
{"name": "GST returns", "allowed_types": ["pdf", "xls", "xlsx", "csv"], "mandatory": False},
],
},
]
OFFICER_BANKS = ["HDFC Bank"]
COMPANY_UPLOAD_TYPES = [
"pdf",
"csv",
"txt",
"json",
"xml",
"doc",
"docx",
"xls",
"xlsx",
"ppt",
"pptx",
"png",
"jpg",
"jpeg",
]
def build_mock_officer_apps() -> list[dict]:
return [
{
"id": "APP-2026-001",
"company_name": "Bluewave Manufacturing",
"loan_amount": 850000,
"status": "Pending",
"risk_score": 61,
"industry": "Manufacturing",
"location": "Mumbai",
"financial_summary": {"revenue": "$3.2M", "profit": "$410K", "flags": ["Revenue mismatch"]},
"risk_signals": ["Revenue mismatch", "Negative news scan clean", "No active litigation"],
"ai_recommendation": "Approve",
"ai_reason": "Cashflow is stable and leverage ratio is moderate.",
"officer_decision": None,
"officer_remarks": "",
},
{
"id": "APP-2026-002",
"company_name": "Nexa Retail Pvt Ltd",
"loan_amount": 1200000,
"status": "Pending",
"risk_score": 44,
"industry": "Retail",
"location": "Delhi",
"financial_summary": {"revenue": "$2.4M", "profit": "$120K", "flags": ["Profit margin dip"]},
"risk_signals": ["Revenue mismatch", "Negative media references found", "One litigation record"],
"ai_recommendation": "Reject",
"ai_reason": "Multiple risk factors with weak profitability trend.",
"officer_decision": None,
"officer_remarks": "",
},
{
"id": "APP-2026-003",
"company_name": "CoreGrid Logistics",
"loan_amount": 640000,
"status": "Reviewed",
"risk_score": 72,
"industry": "Logistics",
"location": "Bengaluru",
"financial_summary": {"revenue": "$4.1M", "profit": "$530K", "flags": []},
"risk_signals": ["No revenue mismatch", "Negative news scan clean", "No litigation"],
"ai_recommendation": "Approve",
"ai_reason": "Strong DSCR and healthy repayment behavior on past facilities.",
"officer_decision": "Approved",
"officer_remarks": "Good debt service track record.",
},
]