-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirebase-blueprint.json
More file actions
76 lines (76 loc) · 2.55 KB
/
firebase-blueprint.json
File metadata and controls
76 lines (76 loc) · 2.55 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
{
"entities": {
"Household": {
"title": "Household",
"description": "Represents a household with an owner and an optional cook.",
"type": "object",
"properties": {
"ownerId": { "type": "string" },
"cookEmail": { "type": "string" }
},
"required": ["ownerId"]
},
"InventoryItem": {
"title": "Inventory Item",
"description": "An item in the pantry",
"type": "object",
"properties": {
"name": { "type": "string" },
"nameHi": { "type": "string" },
"category": { "type": "string" },
"status": { "type": "string", "enum": ["in-stock", "low", "out"] },
"icon": { "type": "string" },
"lastUpdated": { "type": "string" },
"updatedBy": { "type": "string", "enum": ["owner", "cook"] },
"verificationNeeded": { "type": "boolean" },
"anomalyReason": { "type": "string" },
"defaultQuantity": { "type": "string" },
"requestedQuantity": { "type": "string" }
},
"required": ["name", "category", "status", "icon"]
},
"MealPlan": {
"title": "Meal Plan",
"description": "Daily meal plan",
"type": "object",
"properties": {
"morning": { "type": "string" },
"evening": { "type": "string" },
"notes": { "type": "string" },
"leftovers": { "type": "string" }
}
},
"PantryLog": {
"title": "Pantry Log",
"description": "Log of inventory changes",
"type": "object",
"properties": {
"itemId": { "type": "string" },
"itemName": { "type": "string" },
"oldStatus": { "type": "string" },
"newStatus": { "type": "string" },
"timestamp": { "type": "string" },
"role": { "type": "string", "enum": ["owner", "cook"] }
},
"required": ["itemId", "itemName", "oldStatus", "newStatus", "timestamp", "role"]
}
},
"firestore": {
"/households/{householdId}": {
"schema": { "$ref": "#/entities/Household" },
"description": "Household documents containing owner and cook info"
},
"/households/{householdId}/inventory/{itemId}": {
"schema": { "$ref": "#/entities/InventoryItem" },
"description": "Household's inventory items"
},
"/households/{householdId}/meals/{date}": {
"schema": { "$ref": "#/entities/MealPlan" },
"description": "Household's meal plans by date"
},
"/households/{householdId}/logs/{logId}": {
"schema": { "$ref": "#/entities/PantryLog" },
"description": "Household's pantry activity logs"
}
}
}