-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase-blueprint.json
More file actions
59 lines (59 loc) · 2.06 KB
/
firebase-blueprint.json
File metadata and controls
59 lines (59 loc) · 2.06 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
{
"entities": {
"UserProfile": {
"title": "User Profile & Vault",
"description": "Core identity and financial state for a simulated user.",
"type": "object",
"properties": {
"email": { "type": "string", "format": "email" },
"displayName": { "type": "string" },
"vault": {
"type": "object",
"properties": {
"balance": { "type": "number", "description": "Current simulated liquidity in INR" },
"xp": { "type": "number" },
"level": { "type": "number" },
"monthlyQuota": { "type": "number" },
"rupayCredit": {
"type": "object",
"properties": {
"limit": { "type": "number" },
"used": { "type": "number" },
"cardNumber": { "type": "string" }
}
}
},
"required": ["balance", "xp", "level"]
}
},
"required": ["email", "vault"]
},
"LedgerEntry": {
"title": "Transaction Ledger",
"description": "An immutable record of a simulated financial event.",
"type": "object",
"properties": {
"amount": { "type": "number" },
"type": { "type": "string", "enum": ["DEBIT", "CREDIT"] },
"instrument": { "type": "string", "enum": ["VAULT_BALANCE", "RUPAY_CREDIT"] },
"category": { "type": "string" },
"merchantName": { "type": "string" },
"vpa": { "type": "string", "description": "Virtual Payment Address (UPI ID)" },
"timestamp": { "type": "string", "format": "date-time" },
"status": { "type": "string", "enum": ["SUCCESS", "FAILED"] },
"npciReference": { "type": "string" }
},
"required": ["amount", "type", "merchantName", "vpa", "timestamp", "status"]
}
},
"firestore": {
"/users/{uid}": {
"schema": "UserProfile",
"description": "Root user document containing vault state."
},
"/users/{uid}/ledger": {
"schema": "LedgerEntry",
"description": "Subcollection of transaction history."
}
}
}