This is a simple schema file that can be used to pass in prompt.
Browse files- sample_schema.json +224 -0
sample_schema.json
ADDED
@@ -0,0 +1,224 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"database": {
|
3 |
+
"name": "customer360_retail_db",
|
4 |
+
"collections": [
|
5 |
+
{
|
6 |
+
"name": "customers",
|
7 |
+
"fields": {
|
8 |
+
"_id": "ObjectId",
|
9 |
+
"customer_id": "String",
|
10 |
+
"first_name": "String",
|
11 |
+
"last_name": "String",
|
12 |
+
"email": "String",
|
13 |
+
"phone": "String",
|
14 |
+
"date_of_birth": "Date",
|
15 |
+
"gender": "String",
|
16 |
+
"registration_date": "Date",
|
17 |
+
"customer_segment": "String",
|
18 |
+
"preferences": "Array",
|
19 |
+
"address": {
|
20 |
+
"street": "String",
|
21 |
+
"city": "String",
|
22 |
+
"state": "String",
|
23 |
+
"zipcode": "String",
|
24 |
+
"country": "String"
|
25 |
+
},
|
26 |
+
"opt_in_marketing": "Boolean",
|
27 |
+
"created_at": "Date",
|
28 |
+
"updated_at": "Date"
|
29 |
+
},
|
30 |
+
"indexes": [
|
31 |
+
{"customer_id": 1, "unique": true},
|
32 |
+
{"email": 1, "unique": true},
|
33 |
+
{"phone": 1},
|
34 |
+
{"customer_segment": 1}
|
35 |
+
]
|
36 |
+
},
|
37 |
+
{
|
38 |
+
"name": "transactions",
|
39 |
+
"fields": {
|
40 |
+
"_id": "ObjectId",
|
41 |
+
"transaction_id": "String",
|
42 |
+
"customer_id": "String",
|
43 |
+
"transaction_date": "Date",
|
44 |
+
"items_purchased": [
|
45 |
+
{
|
46 |
+
"product_id": "String",
|
47 |
+
"product_name": "String",
|
48 |
+
"category": "String",
|
49 |
+
"quantity": "Int",
|
50 |
+
"price": "Double"
|
51 |
+
}
|
52 |
+
],
|
53 |
+
"payment_method": "String",
|
54 |
+
"total_amount": "Double",
|
55 |
+
"store_id": "String",
|
56 |
+
"channel": "String",
|
57 |
+
"created_at": "Date"
|
58 |
+
},
|
59 |
+
"indexes": [
|
60 |
+
{"transaction_id": 1, "unique": true},
|
61 |
+
{"customer_id": 1},
|
62 |
+
{"transaction_date": -1},
|
63 |
+
{"store_id": 1}
|
64 |
+
]
|
65 |
+
},
|
66 |
+
{
|
67 |
+
"name": "products",
|
68 |
+
"fields": {
|
69 |
+
"_id": "ObjectId",
|
70 |
+
"product_id": "String",
|
71 |
+
"name": "String",
|
72 |
+
"description": "String",
|
73 |
+
"category": "String",
|
74 |
+
"sub_category": "String",
|
75 |
+
"brand": "String",
|
76 |
+
"price": "Double",
|
77 |
+
"available": "Boolean",
|
78 |
+
"created_at": "Date",
|
79 |
+
"updated_at": "Date"
|
80 |
+
},
|
81 |
+
"indexes": [
|
82 |
+
{"product_id": 1, "unique": true},
|
83 |
+
{"category": 1},
|
84 |
+
{"brand": 1},
|
85 |
+
{"available": 1}
|
86 |
+
]
|
87 |
+
},
|
88 |
+
{
|
89 |
+
"name": "web_activities",
|
90 |
+
"fields": {
|
91 |
+
"_id": "ObjectId",
|
92 |
+
"activity_id": "String",
|
93 |
+
"customer_id": "String",
|
94 |
+
"session_id": "String",
|
95 |
+
"activity_type": "String",
|
96 |
+
"page_url": "String",
|
97 |
+
"referrer": "String",
|
98 |
+
"device": {
|
99 |
+
"device_type": "String",
|
100 |
+
"browser": "String",
|
101 |
+
"os": "String"
|
102 |
+
},
|
103 |
+
"activity_timestamp": "Date",
|
104 |
+
"metadata": "Object",
|
105 |
+
"created_at": "Date"
|
106 |
+
},
|
107 |
+
"indexes": [
|
108 |
+
{"activity_id": 1, "unique": true},
|
109 |
+
{"customer_id": 1},
|
110 |
+
{"session_id": 1},
|
111 |
+
{"activity_type": 1},
|
112 |
+
{"activity_timestamp": -1}
|
113 |
+
]
|
114 |
+
},
|
115 |
+
{
|
116 |
+
"name": "marketing_campaigns",
|
117 |
+
"fields": {
|
118 |
+
"_id": "ObjectId",
|
119 |
+
"campaign_id": "String",
|
120 |
+
"name": "String",
|
121 |
+
"description": "String",
|
122 |
+
"start_date": "Date",
|
123 |
+
"end_date": "Date",
|
124 |
+
"channels": "Array",
|
125 |
+
"segment_targets": "Array",
|
126 |
+
"status": "String",
|
127 |
+
"budget": "Double",
|
128 |
+
"spent": "Double",
|
129 |
+
"performance_metrics": "Object",
|
130 |
+
"created_at": "Date",
|
131 |
+
"updated_at": "Date"
|
132 |
+
},
|
133 |
+
"indexes": [
|
134 |
+
{"campaign_id": 1, "unique": true},
|
135 |
+
{"name": 1},
|
136 |
+
{"status": 1},
|
137 |
+
{"start_date": -1}
|
138 |
+
]
|
139 |
+
},
|
140 |
+
{
|
141 |
+
"name": "support_interactions",
|
142 |
+
"fields": {
|
143 |
+
"_id": "ObjectId",
|
144 |
+
"interaction_id": "String",
|
145 |
+
"customer_id": "String",
|
146 |
+
"date": "Date",
|
147 |
+
"channel": "String",
|
148 |
+
"support_agent": "String",
|
149 |
+
"reason": "String",
|
150 |
+
"resolution_status": "String",
|
151 |
+
"resolution_time_minutes": "Int",
|
152 |
+
"notes": "String",
|
153 |
+
"created_at": "Date"
|
154 |
+
},
|
155 |
+
"indexes": [
|
156 |
+
{"interaction_id": 1, "unique": true},
|
157 |
+
{"customer_id": 1},
|
158 |
+
{"date": -1},
|
159 |
+
{"resolution_status": 1}
|
160 |
+
]
|
161 |
+
},
|
162 |
+
{
|
163 |
+
"name": "loyalty_program",
|
164 |
+
"fields": {
|
165 |
+
"_id": "ObjectId",
|
166 |
+
"customer_id": "String",
|
167 |
+
"loyalty_number": "String",
|
168 |
+
"points": "Int",
|
169 |
+
"membership_tier": "String",
|
170 |
+
"enrolled_date": "Date",
|
171 |
+
"last_activity_date": "Date",
|
172 |
+
"rewards_redeemed": "Array",
|
173 |
+
"created_at": "Date",
|
174 |
+
"updated_at": "Date"
|
175 |
+
},
|
176 |
+
"indexes": [
|
177 |
+
{"customer_id": 1, "unique": true},
|
178 |
+
{"loyalty_number": 1, "unique": true},
|
179 |
+
{"membership_tier": 1}
|
180 |
+
]
|
181 |
+
},
|
182 |
+
{
|
183 |
+
"name": "analytics_reports",
|
184 |
+
"fields": {
|
185 |
+
"_id": "ObjectId",
|
186 |
+
"report_id": "String",
|
187 |
+
"generated_date": "Date",
|
188 |
+
"report_type": "String",
|
189 |
+
"time_period": {
|
190 |
+
"start_date": "Date",
|
191 |
+
"end_date": "Date"
|
192 |
+
},
|
193 |
+
"parameters": "Object",
|
194 |
+
"result": "Object",
|
195 |
+
"generated_by": "String",
|
196 |
+
"created_at": "Date"
|
197 |
+
},
|
198 |
+
"indexes": [
|
199 |
+
{"report_id": 1, "unique": true},
|
200 |
+
{"report_type": 1},
|
201 |
+
{"generated_date": -1}
|
202 |
+
]
|
203 |
+
},
|
204 |
+
{
|
205 |
+
"name": "users",
|
206 |
+
"fields": {
|
207 |
+
"_id": "ObjectId",
|
208 |
+
"user_id": "String",
|
209 |
+
"name": "String",
|
210 |
+
"email": "String",
|
211 |
+
"password_hash": "String",
|
212 |
+
"role": "String",
|
213 |
+
"permissions": "Array",
|
214 |
+
"created_at": "Date"
|
215 |
+
},
|
216 |
+
"indexes": [
|
217 |
+
{"user_id": 1, "unique": true},
|
218 |
+
{"email": 1, "unique": true},
|
219 |
+
{"role": 1}
|
220 |
+
]
|
221 |
+
}
|
222 |
+
]
|
223 |
+
}
|
224 |
+
}
|