Repository navigation
Expand file tree
/
Copy pathCreate.mongodb.js
More file actions
233 lines (227 loc) · 20 KB
/
Copy pathCreate.mongodb.js
File metadata and controls
233 lines (227 loc) · 20 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
use ('E-Commerce');
db.contacts.insertMany([
{
"name": "Aaliyah Turner",
"email": "aaliyah.turner@example.com",
"phone": "555-0101",
"address": { "street": "221 Oak St", "city": "Springfield", "state": "IL", "zip": "62704" },
"preferredContactMethod": "email",
"newsletterSubscribed": true,
"createdAt": new Date()
},
{
"name": "Benjamin Clark",
"email": "ben.clark@example.com",
"phone": "555-0123",
"address": { "street": "88 Maple Ave", "city": "Madison", "state": "WI", "zip": "53703" },
"preferredContactMethod": "phone",
"newsletterSubscribed": false,
"createdAt": new Date()
},
{
"name": "Camila Rivera",
"email": "camila.rivera@example.com",
"phone": "555-0145",
"address": { "street": "14 Birch Ln", "city": "Austin", "state": "TX", "zip": "78701" },
"preferredContactMethod": "email",
"newsletterSubscribed": true,
"createdAt": new Date()
},
{
"name": "David Patel",
"email": "david.patel@example.com",
"phone": "555-0167",
"address": { "street": "432 Pine St", "city": "Denver", "state": "CO", "zip": "80203" },
"preferredContactMethod": "phone",
"newsletterSubscribed": false,
"createdAt": new Date()
},
{
"name": "Elena Morgan",
"email": "elena.morgan@example.com",
"phone": "555-0189",
"address": { "street": "307 Cherry Blvd", "city": "Portland", "state": "OR", "zip": "97205" },
"preferredContactMethod": "email",
"newsletterSubscribed": true,
"createdAt": new Date()
}
]);
db.orders.insertMany([
{
"orderNumber": "ORD1001",
"customerName": "Aaliyah Turner",
"customerEmail": "aaliyah.turner@example.com",
"items": [
{ "productName": "Mechanical Keyboard", "quantity": 1, "price": 199 },
{ "productName": "Wireless Mouse", "quantity": 1, "price": 99.99 }
],
"totalAmount": 298.99,
"status": "Processing",
"orderDate": new Date(),
"shippingAddress": { "street": "221 Oak St", "city": "Springfield", "state": "IL", "zip": "62704" },
"paymentMethod": "Credit Card",
"createdAt": new Date()
},
{
"orderNumber": "ORD1002",
"customerName": "Benjamin Clark",
"customerEmail": "ben.clark@example.com",
"items": [
{ "productName": "Coffee Maker", "quantity": 1, "price": 79.99 },
{ "productName": "Blender", "quantity": 1, "price": 59.99 }
],
"totalAmount": 139.98,
"status": "Shipped",
"orderDate": new Date(),
"shippingAddress": { "street": "88 Maple Ave", "city": "Madison", "state": "WI", "zip": "53703" },
"paymentMethod": "PayPal",
"createdAt": new Date()
},
{
"orderNumber": "ORD1003",
"customerName": "Camila Rivera",
"customerEmail": "camila.rivera@example.com",
"items": [
{ "productName": "Yoga Mat", "quantity": 2, "price": 24.99 },
{ "productName": "Resistance Bands", "quantity": 1, "price": 19.99 }
],
"totalAmount": 69.97,
"status": "Delivered",
"orderDate": new Date(),
"shippingAddress": { "street": "14 Birch Ln", "city": "Austin", "state": "TX", "zip": "78701" },
"paymentMethod": "Debit Card",
"createdAt": new Date()
},
{
"orderNumber": "ORD1004",
"customerName": "David Patel",
"customerEmail": "david.patel@example.com",
"items": [
{ "productName": "Smartwatch", "quantity": 1, "price": 219.99 },
{ "productName": "Portable Charger", "quantity": 1, "price": 39.99 }
],
"totalAmount": 259.98,
"status": "Processing",
"orderDate": new Date(),
"shippingAddress": { "street": "432 Pine St", "city": "Denver", "state": "CO", "zip": "80203" },
"paymentMethod": "Credit Card",
"createdAt": new Date()
},
{
"orderNumber": "ORD1005",
"customerName": "Elena Morgan",
"customerEmail": "elena.morgan@example.com",
"items": [
{ "productName": "Air Purifier", "quantity": 1, "price": 179.99 },
{ "productName": "Smart Light Bulb", "quantity": 3, "price": 22.99 }
],
"totalAmount": 248.96,
"status": "Delivered",
"orderDate": new Date(),
"shippingAddress": { "street": "307 Cherry Blvd", "city": "Portland", "state": "OR", "zip": "97205" },
"paymentMethod": "Credit Card",
"createdAt": new Date()
}
]);
db.Products.insertMany([
{ "name": "Mechanical Keyboard", "price": 199, "category": "Electronics", "stock": 80, "ratings": 4.8, "tags": ["keyboard", "mechanical"], "createdAt": new Date() },
{ "name": "Wireless Mouse", "price": 99.99, "category": "Electronics", "stock": 150, "ratings": 4.5, "tags": ["mouse", "wireless"], "createdAt": new Date() },
{ "name": "Monitor", "price": 299.99, "category": "Electronics", "stock": 50, "ratings": 4.6, "tags": ["monitor", "lcd"], "createdAt": new Date() },
{ "name": "Cabinet", "price": 499, "category": "Electronics", "stock": 80, "ratings": 4.8, "tags": ["cabinet", "storage"], "createdAt": new Date() },
{ "name": "Laptop Stand", "price": 49.99, "category": "Electronics", "stock": 120, "ratings": 4.4, "tags": ["laptop", "stand", "ergonomic"], "createdAt": new Date() },
{ "name": "Bluetooth Speaker", "price": 129.99, "category": "Electronics", "stock": 95, "ratings": 4.7, "tags": ["speaker", "bluetooth"], "createdAt": new Date() },
{ "name": "Noise Cancelling Headphones", "price": 249, "category": "Electronics", "stock": 45, "ratings": 4.6, "tags": ["headphones", "noise cancelling"], "createdAt": new Date() },
{ "name": "Smartwatch", "price": 219.99, "category": "Electronics", "stock": 70, "ratings": 4.5, "tags": ["watch", "smartwatch"], "createdAt": new Date() },
{ "name": "Portable Charger", "price": 39.99, "category": "Electronics", "stock": 180, "ratings": 4.3, "tags": ["charger", "portable"], "createdAt": new Date() },
{ "name": "USB-C Hub", "price": 59.99, "category": "Electronics", "stock": 140, "ratings": 4.2, "tags": ["usb-c", "hub"], "createdAt": new Date() },
{ "name": "Gaming Chair", "price": 329.99, "category": "Electronics", "stock": 35, "ratings": 4.1, "tags": ["chair", "gaming"], "createdAt": new Date() },
{ "name": "4K Webcam", "price": 139.99, "category": "Electronics", "stock": 60, "ratings": 4.4, "tags": ["webcam", "4k"], "createdAt": new Date() },
{ "name": "Desk Lamp", "price": 29.99, "category": "Home", "stock": 170, "ratings": 4.6, "tags": ["lamp", "desk", "lighting"], "createdAt": new Date() },
{ "name": "Air Purifier", "price": 179.99, "category": "Home", "stock": 55, "ratings": 4.5, "tags": ["air", "purifier"], "createdAt": new Date() },
{ "name": "Floor Mat", "price": 24.99, "category": "Home", "stock": 130, "ratings": 4.1, "tags": ["mat", "floor"], "createdAt": new Date() },
{ "name": "Ergonomic Mouse Pad", "price": 19.99, "category": "Home", "stock": 200, "ratings": 4.2, "tags": ["mouse", "pad", "ergonomic"], "createdAt": new Date() },
{ "name": "Smart Thermostat", "price": 249.99, "category": "Home", "stock": 40, "ratings": 4.7, "tags": ["thermostat", "smart home"], "createdAt": new Date() },
{ "name": "LED Desk Light", "price": 34.99, "category": "Home", "stock": 150, "ratings": 4.5, "tags": ["desk", "led", "light"], "createdAt": new Date() },
{ "name": "Wi-Fi Router", "price": 119.99, "category": "Home", "stock": 85, "ratings": 4.3, "tags": ["router", "wifi"], "createdAt": new Date() },
{ "name": "SSD External Drive", "price": 149.99, "category": "Electronics", "stock": 90, "ratings": 4.6, "tags": ["storage", "ssd", "external"], "createdAt": new Date() },
{ "name": "Desk Organizer", "price": 27.99, "category": "Office", "stock": 160, "ratings": 4.4, "tags": ["desk", "organizer"], "createdAt": new Date() },
{ "name": "Standing Desk", "price": 399.99, "category": "Office", "stock": 25, "ratings": 4.5, "tags": ["desk", "standing"], "createdAt": new Date() },
{ "name": "Whiteboard", "price": 49.99, "category": "Office", "stock": 110, "ratings": 4.2, "tags": ["whiteboard", "office"], "createdAt": new Date() },
{ "name": "Office Chair", "price": 189.99, "category": "Office", "stock": 70, "ratings": 4.3, "tags": ["chair", "office"], "createdAt": new Date() },
{ "name": "Wireless Charger", "price": 34.99, "category": "Electronics", "stock": 145, "ratings": 4.4, "tags": ["charger", "wireless"], "createdAt": new Date() },
{ "name": "Portable Projector", "price": 279.99, "category": "Electronics", "stock": 30, "ratings": 4.0, "tags": ["projector", "portable"], "createdAt": new Date() },
{ "name": "Laptop Backpack", "price": 69.99, "category": "Office", "stock": 80, "ratings": 4.5, "tags": ["backpack", "laptop"], "createdAt": new Date() },
{ "name": "Desk Calendar", "price": 14.99, "category": "Office", "stock": 190, "ratings": 4.1, "tags": ["calendar", "desk"], "createdAt": new Date() },
{ "name": "Noise Machine", "price": 39.99, "category": "Home", "stock": 100, "ratings": 4.3, "tags": ["noise", "sound"], "createdAt": new Date() },
{ "name": "Label Printer", "price": 89.99, "category": "Office", "stock": 65, "ratings": 4.4, "tags": ["printer", "label"], "createdAt": new Date() },
{ "name": "File Cabinet", "price": 129.99, "category": "Office", "stock": 40, "ratings": 4.2, "tags": ["cabinet", "file"], "createdAt": new Date() },
{ "name": "Coffee Maker", "price": 79.99, "category": "Kitchen", "stock": 120, "ratings": 4.5, "tags": ["coffee", "kitchen"], "createdAt": new Date() },
{ "name": "Blender", "price": 59.99, "category": "Kitchen", "stock": 105, "ratings": 4.3, "tags": ["blender", "kitchen"], "createdAt": new Date() },
{ "name": "Air Fryer", "price": 129.99, "category": "Kitchen", "stock": 95, "ratings": 4.6, "tags": ["air fryer", "kitchen"], "createdAt": new Date() },
{ "name": "Cast Iron Skillet", "price": 39.99, "category": "Kitchen", "stock": 140, "ratings": 4.7, "tags": ["skillet", "cookware"], "createdAt": new Date() },
{ "name": "Cookware Set", "price": 219.99, "category": "Kitchen", "stock": 30, "ratings": 4.5, "tags": ["cookware", "set"], "createdAt": new Date() },
{ "name": "Digital Scale", "price": 25.99, "category": "Kitchen", "stock": 160, "ratings": 4.2, "tags": ["scale", "kitchen"], "createdAt": new Date() },
{ "name": "Food Processor", "price": 89.99, "category": "Kitchen", "stock": 55, "ratings": 4.4, "tags": ["food", "processor"], "createdAt": new Date() },
{ "name": "Electric Kettle", "price": 34.99, "category": "Kitchen", "stock": 130, "ratings": 4.3, "tags": ["kettle", "electric"], "createdAt": new Date() },
{ "name": "Toaster Oven", "price": 99.99, "category": "Kitchen", "stock": 75, "ratings": 4.2, "tags": ["toaster", "oven"], "createdAt": new Date() },
{ "name": "Knife Set", "price": 149.99, "category": "Kitchen", "stock": 45, "ratings": 4.6, "tags": ["knife", "set"], "createdAt": new Date() },
{ "name": "Baking Sheet", "price": 18.99, "category": "Kitchen", "stock": 170, "ratings": 4.1, "tags": ["baking", "sheet"], "createdAt": new Date() },
{ "name": "Pressure Cooker", "price": 119.99, "category": "Kitchen", "stock": 60, "ratings": 4.6, "tags": ["pressure cooker", "kitchen"], "createdAt": new Date() },
{ "name": "Rechargeable Hand Mixer", "price": 49.99, "category": "Kitchen", "stock": 80, "ratings": 4.3, "tags": ["mixer", "handheld"], "createdAt": new Date() },
{ "name": "Household Vacuum", "price": 149.99, "category": "Home", "stock": 70, "ratings": 4.4, "tags": ["vacuum", "cleaning"], "createdAt": new Date() },
{ "name": "Smart Doorbell", "price": 179.99, "category": "Home", "stock": 50, "ratings": 4.5, "tags": ["doorbell", "smart home"], "createdAt": new Date() },
{ "name": "Security Camera", "price": 89.99, "category": "Home", "stock": 90, "ratings": 4.2, "tags": ["camera", "security"], "createdAt": new Date() },
{ "name": "Robotic Vacuum", "price": 299.99, "category": "Home", "stock": 35, "ratings": 4.1, "tags": ["robotic", "vacuum"], "createdAt": new Date() },
{ "name": "Smart Light Bulb", "price": 22.99, "category": "Home", "stock": 200, "ratings": 4.3, "tags": ["light", "smart"], "createdAt": new Date() },
{ "name": "Water Filter Pitcher", "price": 39.99, "category": "Home", "stock": 120, "ratings": 4.5, "tags": ["water", "filter"], "createdAt": new Date() },
{ "name": "Mattress Topper", "price": 129.99, "category": "Home", "stock": 40, "ratings": 4.4, "tags": ["mattress", "topper"], "createdAt": new Date() },
{ "name": "Pillow Set", "price": 59.99, "category": "Home", "stock": 90, "ratings": 4.2, "tags": ["pillow", "bedroom"], "createdAt": new Date() },
{ "name": "Shower Head", "price": 34.99, "category": "Home", "stock": 110, "ratings": 4.1, "tags": ["shower", "bath"], "createdAt": new Date() },
{ "name": "Bath Towels", "price": 29.99, "category": "Home", "stock": 140, "ratings": 4.3, "tags": ["towels", "bath"], "createdAt": new Date() },
{ "name": "Sofa Cover", "price": 79.99, "category": "Home", "stock": 65, "ratings": 4.0, "tags": ["sofa", "cover"], "createdAt": new Date() },
{ "name": "Portable Heater", "price": 69.99, "category": "Home", "stock": 80, "ratings": 4.1, "tags": ["heater", "portable"], "createdAt": new Date() },
{ "name": "Gardening Tool Set", "price": 49.99, "category": "Outdoor", "stock": 95, "ratings": 4.5, "tags": ["gardening", "tools"], "createdAt": new Date() },
{ "name": "Patio Umbrella", "price": 89.99, "category": "Outdoor", "stock": 55, "ratings": 4.2, "tags": ["patio", "umbrella"], "createdAt": new Date() },
{ "name": "Picnic Basket", "price": 39.99, "category": "Outdoor", "stock": 120, "ratings": 4.4, "tags": ["picnic", "basket"], "createdAt": new Date() },
{ "name": "Outdoor Fire Pit", "price": 159.99, "category": "Outdoor", "stock": 30, "ratings": 4.3, "tags": ["fire pit", "outdoor"], "createdAt": new Date() },
{ "name": "Camping Tent", "price": 139.99, "category": "Outdoor", "stock": 45, "ratings": 4.2, "tags": ["camping", "tent"], "createdAt": new Date() },
{ "name": "Hiking Backpack", "price": 79.99, "category": "Outdoor", "stock": 85, "ratings": 4.4, "tags": ["hiking", "backpack"], "createdAt": new Date() },
{ "name": "Folding Chair", "price": 29.99, "category": "Outdoor", "stock": 125, "ratings": 4.1, "tags": ["chair", "folding"], "createdAt": new Date() },
{ "name": "Cooler Box", "price": 49.99, "category": "Outdoor", "stock": 105, "ratings": 4.3, "tags": ["cooler", "box"], "createdAt": new Date() },
{ "name": "Bike Helmet", "price": 59.99, "category": "Sports", "stock": 95, "ratings": 4.5, "tags": ["bike", "helmet"], "createdAt": new Date() },
{ "name": "Kayak Paddle", "price": 39.99, "category": "Sports", "stock": 65, "ratings": 4.2, "tags": ["kayak", "paddle"], "createdAt": new Date() },
{ "name": "Fishing Rod", "price": 79.99, "category": "Sports", "stock": 50, "ratings": 4.0, "tags": ["fishing", "rod"], "createdAt": new Date() },
{ "name": "Lawn Mower", "price": 249.99, "category": "Outdoor", "stock": 20, "ratings": 4.2, "tags": ["lawn", "mower"], "createdAt": new Date() },
{ "name": "Sports Watch", "price": 129.99, "category": "Sports", "stock": 70, "ratings": 4.3, "tags": ["watch", "sports"], "createdAt": new Date() },
{ "name": "Yoga Mat", "price": 24.99, "category": "Sports", "stock": 145, "ratings": 4.6, "tags": ["yoga", "mat"], "createdAt": new Date() },
{ "name": "Dumbbell Set", "price": 89.99, "category": "Sports", "stock": 80, "ratings": 4.4, "tags": ["dumbbell", "weights"], "createdAt": new Date() },
{ "name": "Tennis Racket", "price": 69.99, "category": "Sports", "stock": 90, "ratings": 4.1, "tags": ["tennis", "racket"], "createdAt": new Date() },
{ "name": "Basketball", "price": 29.99, "category": "Sports", "stock": 120, "ratings": 4.5, "tags": ["basketball", "sports"], "createdAt": new Date() },
{ "name": "Running Shoes", "price": 109.99, "category": "Sports", "stock": 70, "ratings": 4.4, "tags": ["shoes", "running"], "createdAt": new Date() },
{ "name": "Football", "price": 34.99, "category": "Sports", "stock": 110, "ratings": 4.2, "tags": ["football", "sports"], "createdAt": new Date() },
{ "name": "Resistance Bands", "price": 19.99, "category": "Sports", "stock": 155, "ratings": 4.3, "tags": ["resistance", "fitness"], "createdAt": new Date() },
{ "name": "Protein Shaker", "price": 14.99, "category": "Sports", "stock": 180, "ratings": 4.2, "tags": ["protein", "shaker"], "createdAt": new Date() },
{ "name": "Sports Sunglasses", "price": 49.99, "category": "Sports", "stock": 75, "ratings": 4.1, "tags": ["sunglasses", "sports"], "createdAt": new Date() },
{ "name": "Golf Gloves", "price": 24.99, "category": "Sports", "stock": 100, "ratings": 4.3, "tags": ["golf", "gloves"], "createdAt": new Date() },
{ "name": "Bicycle Pump", "price": 29.99, "category": "Sports", "stock": 140, "ratings": 4.3, "tags": ["bicycle", "pump"], "createdAt": new Date() },
{ "name": "Makeup Palette", "price": 39.99, "category": "Beauty", "stock": 90, "ratings": 4.4, "tags": ["makeup", "palette"], "createdAt": new Date() },
{ "name": "Skincare Serum", "price": 29.99, "category": "Beauty", "stock": 130, "ratings": 4.6, "tags": ["skincare", "serum"], "createdAt": new Date() },
{ "name": "Hair Dryer", "price": 59.99, "category": "Beauty", "stock": 75, "ratings": 4.2, "tags": ["hair", "dryer"], "createdAt": new Date() },
{ "name": "Perfume", "price": 69.99, "category": "Beauty", "stock": 80, "ratings": 4.4, "tags": ["perfume", "fragrance"], "createdAt": new Date() },
{ "name": "Nail Polish Set", "price": 24.99, "category": "Beauty", "stock": 100, "ratings": 4.3, "tags": ["nail", "polish"], "createdAt": new Date() },
{ "name": "Shampoo", "price": 12.99, "category": "Beauty", "stock": 175, "ratings": 4.1, "tags": ["shampoo", "hair care"], "createdAt": new Date() },
{ "name": "Facial Cleanser", "price": 19.99, "category": "Beauty", "stock": 140, "ratings": 4.2, "tags": ["facial", "cleanser"], "createdAt": new Date() },
{ "name": "Sunscreen", "price": 17.99, "category": "Beauty", "stock": 160, "ratings": 4.5, "tags": ["sunscreen", "skincare"], "createdAt": new Date() },
{ "name": "Lip Balm", "price": 7.99, "category": "Beauty", "stock": 210, "ratings": 4.3, "tags": ["lip", "balm"], "createdAt": new Date() },
{ "name": "Body Lotion", "price": 14.99, "category": "Beauty", "stock": 180, "ratings": 4.2, "tags": ["lotion", "body"], "createdAt": new Date() },
{ "name": "Toy Train", "price": 39.99, "category": "Toys", "stock": 80, "ratings": 4.4, "tags": ["toy", "train"], "createdAt": new Date() },
{ "name": "Building Blocks", "price": 34.99, "category": "Toys", "stock": 95, "ratings": 4.6, "tags": ["blocks", "building"], "createdAt": new Date() },
{ "name": "Puzzle Game", "price": 19.99, "category": "Toys", "stock": 120, "ratings": 4.5, "tags": ["puzzle", "game"], "createdAt": new Date() },
{ "name": "Plush Animal", "price": 24.99, "category": "Toys", "stock": 130, "ratings": 4.3, "tags": ["plush", "toy"], "createdAt": new Date() },
{ "name": "Board Game", "price": 49.99, "category": "Toys", "stock": 70, "ratings": 4.4, "tags": ["board game", "family"], "createdAt": new Date() },
{ "name": "Remote Control Car", "price": 59.99, "category": "Toys", "stock": 60, "ratings": 4.2, "tags": ["remote control", "car"], "createdAt": new Date() },
{ "name": "Art Supplies Kit", "price": 44.99, "category": "Toys", "stock": 85, "ratings": 4.3, "tags": ["art", "supplies"], "createdAt": new Date() },
{ "name": "Science Kit", "price": 34.99, "category": "Toys", "stock": 75, "ratings": 4.5, "tags": ["science", "kit"], "createdAt": new Date() },
{ "name": "Kids Tablet", "price": 129.99, "category": "Toys", "stock": 45, "ratings": 4.1, "tags": ["tablet", "kids"], "createdAt": new Date() },
{ "name": "Baby Monitor", "price": 99.99, "category": "Baby", "stock": 60, "ratings": 4.4, "tags": ["baby", "monitor"], "createdAt": new Date() }
]);