-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd_data.js
512 lines (432 loc) · 13.2 KB
/
add_data.js
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
const db = require('./models/db.js');
const bcrypt = require('bcrypt');
const saltRounds = 10;
const collection = 'User';
const products = 'Product';
const reviews = 'Review';
// const User = require('../models/UserSchema.js');
// const Admin = require('../models/AdminSchema.js');
// const Products = require('./models/ProductSchema.js');
db.createDatabase();
var acc = {
pw: "ihatehinata"
};
bcrypt.hash(acc.pw, saltRounds, function(err, hash){
var hashacc = {
fullName: "Nicole Kageyama",
userName: "QueenOfTheCourt",
email: "[email protected]",
pw: hash,
deladdr: "1138 Aguilar Street Sta. Cruz 1000, Manila",
contactnum: "63917899505"
}
db.insertOne(collection, hashacc);
});
var acc = {
pw: "0nehandt0ss"
};
bcrypt.hash(acc.pw, saltRounds, function(err, hash){
var hashacc = {
fullName: "Carla Oikawa",
userName: "bestsetter1",
email: "[email protected]",
pw: hash,
deladdr: "Unit C D M Building Durian StreetDona Josefa Subdivision Pilar 1740, Las Pinas",
contactnum: "63916562555"
}
db.insertOne(collection, hashacc);
});
var acc = {
pw: "FistOfJustic3",
};
bcrypt.hash(acc.pw, saltRounds, function(err, hash){
var hashacc = {
fullName: "Anna Nijima",
userName: "bestgirl",
email: "[email protected]",
pw: hash,
deladdr: "Cafe LeBlanc, 2/F Palarca Building Quezon Blvd. Cor. Peredes Street Sampaloc 1000, Cafe LeBlanc",
contactnum: "63919421330"
}
db.insertOne(collection, hashacc);
});
var acc = {
pw: "puzzlesRDaBomb"
};
bcrypt.hash(acc.pw, saltRounds, function(err, hash){
var hashacc = {
fullName: "Clarissa Shirogane",
userName: "detectiveprincess",
email: "[email protected]",
pw: hash,
deladdr: "15/F Ps Bank Center 777 Paseo De Roxas Street1226, Makati City",
contactnum: "63920961450"
}
db.insertOne(collection, hashacc);
});
var acc = {
pw: "Ms-door-kun",
};
bcrypt.hash(acc.pw, saltRounds, function(err, hash){
var hashacc = {
fullName: "Ina Arisato",
userName: "bestfemc",
email: "[email protected]",
pw: hash,
deladdr: "3 Anonas Street Potrero 1470, Malabon",
contactnum: "63917885212"
}
db.insertOne(collection, hashacc);
});
var acc = {
pw: "ThisGirlHasNoFace",
};
bcrypt.hash(acc.pw, saltRounds, function(err, hash){
var hashacc = {
fullName: "Arya Stark",
userName: "FacelessMan",
email: "[email protected]",
pw: hash,
deladdr: "260 Roosevelt Avenue, San Francisco Del Monte, 1100, Quezon City, Metro Manila",
contactnum: "63917627622"
}
db.insertOne(collection, hashacc);
});
//insert admin
var admin = {
pw: "xAyaHandRakAn"
}
bcrypt.hash(admin.pw, saltRounds, function(err, hash){
var hashacc = {
userName: "admin",
email: "[email protected]",
pw: hash
}
db.insertOne('Admin', hashacc);
});
// Inserts sample products
// ** Colors and Sizes to be fixed **
var prod = {
pNum: "100456",
pName: "Ultra Stretch Jeans",
pPrice: "1990.00",
pDesc: "Clothing and Science become one. This ultra stretch jeans was made possible through our newest technology. Jeans as light as feather and as smooth as baby's skin. Get yours now and become comfy and stylish today!",
pColor1: "#98A8B9",
pColor2: "#3D5070",
pColor3: "#383D51",
pColor4: "#282425",
pSize1: "XS",
pSize2: "S",
pSize3: "M",
pSize4: "L",
pImage1: "../images/product1a.jpg",
pImage2: "../images/product1b.jpg",
pImage3: "../images/product1c.jpg",
pImage4: "../images/product1d.jpg"
}
db.insertOne(products, prod);
var prod = {
pNum: "100457",
pName: "High Rise Jeans",
pPrice: "1490.00",
pDesc: "Introducing a new generation of High Rise fabric. Our most flattering and comfortable high rise jeans yet.",
pColor1: "#545F73",
pColor2: "#8798A8",
pColor3: "#352F2F",
pColor4: "",
pSize1: "S",
pSize2: "M",
pSize3: "L",
pSize4: "",
pImage1: "../images/product2a.jpg",
pImage2: "../images/product2b.jpg",
pImage3: "../images/product2c.jpg",
pImage4: ""
}
db.insertOne(products, prod);
var prod = {
pNum: "100458",
pName: "Linen Open Collar Shirt",
pPrice: "790.00",
pDesc: "An open collar that makes the most out of the supple and elegant material. An item that has a tasteful, laid-back feel.",
pColor1: "#F1A710",
pColor2: "#EDE4D3",
pColor3: "",
pColor4: "",
pSize1: "XS",
pSize2: "S",
pSize3: "",
pSize4: "",
pImage1: "../images/product3a.jpg",
pImage2: "../images/product3b.jpg",
pImage3: "",
pImage4: ""
}
db.insertOne(products, prod);
var prod = {
pNum: "100459",
pName: "Men's Socks",
pPrice: "390.00",
pDesc: "Your toes stay warm and toasty. A textured, neat knitted fabric.",
pColor1: "#A3A5BA",
pColor2: "#9FA0A2",
pColor3: "#7D4024",
pColor4: "",
pSize1: "",
pSize2: "",
pSize3: "",
pSize4: "",
pImage1: "../images/product4a.jpg",
pImage2: "../images/product4b.jpg",
pImage3: "../images/product4c.jpg",
pImage4: ""
}
db.insertOne(products, prod);
var prod = {
pNum: "100460",
pName: "Long Sleeve Sweatshirt",
pPrice: "1990.00",
pDesc: "Warm and comfortable brushed T-shirt. This item has been updated to make it an easy choice, even when worn on its own.",
pColor1: "#F4EFEC",
pColor2: "#BD8A5B",
pColor3: "#251F23",
pColor4: "#52513C",
pSize1: "S",
pSize2: "M",
pSize3: "L",
pSize4: "XL",
pImage1: "../images/product5a.jpg",
pImage2: "../images/product5b.jpg",
pImage3: "../images/product5c.jpg",
pImage4: "../images/product5d.jpg"
}
db.insertOne(products, prod);
var rev = {
rNum: "5000450",
pNum: "100456",
userName: "QueenOfTheCourt",
rating: "5.0",
rev: "The pants was very smooth and very soft. It was also very light and comfortable. This is probably my best buy ever. I am using it everyday. Planning to buy another one. great job C & S!",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000451",
pNum: "100456",
userName: "QueenOfTheCourt",
rating: "5.0",
rev: "I'm on the heavy side and so wearing jeans is a struggle. But this pair let's me wear jeans again without difficulty (even though I haven't lost any weight)",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000452",
pNum: "100456",
userName: "QueenOfTheCourt",
rating: "3.0",
rev: "This new version seem to fit tighter than the old version. I like it. However, this new version is mid rise, while the old version is high rise. Would’ve been better if they made this high rise too. EZY usually meant high rise in Uniqlo lingo. Puzzled why they made this mid rise.",
img1: "../images/product1a.jpg",
img2: "../images/product1b.jpg"
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000453",
pNum: "100456",
userName: "QueenOfTheCourt",
rating: "4.8",
rev: "This is so comfy and stretchable, I like the fit and it is not too skinny fit on me.",
img1: "../images/product1a.jpg",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000454",
pNum: "100456",
userName: "bestsetter1",
rating: "5.0",
rev: "Great quality jeans! I got this in color blue. These are made to move pants and an all-day-every-day comfort. The material on the inside feels soft against your skin.",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000455",
pNum: "100456",
userName: "bestsetter1",
rating: "4.0",
rev: "The pants are not too skinny and indeed give a good amount of stretch. The fit is more on the slim cut side rather than on skin-hugging skinny cut. Elastic waist band is a welcome bonus.",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000456",
pNum: "100456",
userName: "bestsetter1",
rating: "5.0",
rev: "Very much satisfied with my purchase. It fits me very well. Hoping for more shades of blue for this kind of ankle jeans. Thank you so much C & S.",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000457",
pNum: "100457",
userName: "bestsetter1",
rating: "3.0",
rev: "This new version seem to fit tighter than the old version. I like it. However, its fit is not just for me.",
img1: "../images/product2a.jpg",
img2: "../images/product2b.jpg"
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000458",
pNum: "100457",
userName: "bestgirl",
rating: "4.8",
rev: "Only high rise jeans suits me. I'm glad this is one of those jeans.",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000459",
pNum: "100457",
userName: "bestgirl",
rating: "4.8",
rev: "The fit of the pants does not make it hard for the legs to breathe in.",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000460",
pNum: "100457",
userName: "bestgirl",
rating: "4.8",
rev: "The fit of the pants does not make it hard for the legs to breathe in.",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000461",
pNum: "100458",
userName: "detectiveprincess",
rating: "5.0",
rev: "Im on the heavy side and so finding a shirt that fits me perfectly is a struggle. But this shirt is a miracle!",
img1: "../images/product3a.jpg",
img2: "../images/product3b.jpg"
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000462",
pNum: "100458",
userName: "detectiveprincess",
rating: 3.0,
rev: "This new version seem to fit tighter than the old version. I like it. However, the fit of this shirt for me is weird.",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000463",
pNum: "100458",
userName: "detectiveprincess",
rating: "4.8",
rev: "This is so stylish and comfortable at the same time!",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000464",
pNum: "100458",
userName: "detectiveprincess",
rating: "4.0",
rev: "The shirt embraces my body wonderfully.",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000465",
pNum: "100459",
userName: "bestfemc",
rating: "5.0",
rev: "A bit tight but very smooth. Nice quality socks..",
img1: "../images/product4a.jpg",
img2: "../images/product4b.jpg"
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000466",
pNum: "100459",
userName: "bestfemc",
rating: "5.0",
rev: "This one is comfortable to wear and nice fit on my feet",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000467",
pNum: "100460",
userName: "bestfemc",
rating: "5.0",
rev: "If you're looking for something to be part of your capsule wardrobe, this is definitely one of the must have pieces. It's affordable, fit is perfect plus it is extremely soft! I ended buying 3 different colors!",
img1: "../images/product5a.jpg",
img2: "../images/product5b.jpg"
}
var rev = {
rNum: "5000468",
pNum: "100460",
userName: "bestfemc",
rating: "5.0",
rev: "It fits well. Nice and comfortable. Store personnel are helpful and accomodating. Affordable!",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000469",
pNum: "100460",
userName: "bestfemc",
rating: "4.1",
rev: "Amazing pants. Fits very well. I love it.",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000470",
pNum: "100460",
userName: "bestfemc",
rating: "4.0",
rev: "The texture, the color even the size fits perfectly. I hope there are lots of colors to choose from. Perfect for cold weather as well.",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000471",
pNum: "100460",
userName: "bestfemc",
rating: "4.0",
rev: "I ordered this shirt last december because i thought that the design was nice. The order arrived and i was right, the shirt was very worth the price. But i wish u can add a larger size. I hope u can add a xxl size because i want to wear this design.",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);
var rev = {
rNum: "5000472",
pNum: "100460",
userName: "bestfemc",
rating: "5.0",
rev: "Hubby loves this.. He has this in 3 colors... Perfect fit... Okay for rounds and clinic...",
img1: "",
img2: ""
}
db.insertOne(reviews, rev);