forked from gpitrella/PF-BackEnd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
initDb.js
929 lines (878 loc) · 29.7 KB
/
initDb.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
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
const { Categories, Manufacturer, User, Product } = require("./src/db");
const bcrypt = require('bcrypt');
async function initDb(){
const products = [
{
id: 1,
name: "LENOVO V14-ADA | PROCESADOR AMD ATHLON 3020E | RAM 4GB | SSD 256GB | PANTALLA 14 | FREE SO | TECLADO ES",
price: 109950,
description:
"LENOVO V14-ADA | PROCESADOR AMD ATHLON 3020E | RAM 4GB | SSD 256GB | PANTALLA 14 | FREE SO | TECLADO ES",
image: "https://www.mastecnologia.com.ar/images/productos/90411.png",
discount: 10,
stock: 35,
category:"NOTEBOOKS",
manufacturer:"LENOVO"
},
{
id: 2,
name: "ASUS VIVOBOOK F512D | AMD RYZEN 3 3250U | RAM 4GB | SSD 128GB | PANTALLA 15.6 FHD | WINDOWS 10 HOME | TECLADO US",
price: 220000,
description:
"Slim-fitting style, contrast raglan long sleeve, three-button henley placket, light weight & soft fabric for breathable and comfortable wearing. And Solid stitched shirts with round neck made for durability and a great fit for casual fashion wear and diehard baseball fans. The Henley style round neckline includes a three-button placket.",
image: "https://www.mastecnologia.com.ar/images/productos/89981.png",
discount: 10,
stock: 35,
category:"NOTEBOOKS",
manufacturer:"ASUS"
},
{
id: 3,
name: "HP 250 G8 INTEL CORE I7-1165G7 | RAM 8GB | SSD M2 512 | PANTALLA 15.6 | FREE SO",
price: 162000,
description:
"Slim-fitting style, contrast raglan long sleeve, three-button henley placket, light weight & soft fabric for breathable and comfortable wearing. And Solid stitched shirts with round neck made for durability and a great fit for casual fashion wear and diehard baseball fans. The Henley style round neckline includes a three-button placket.",
image: "https://www.mastecnologia.com.ar/images/productos/90833.png",
discount: 15,
stock: 34,
category:"NOTEBOOKS",
manufacturer:"HP"
},
{
id: 4,
name: "NOTEBOOK INSPIRON 3000-3511 INTEL CORE I5-1035G1 | RAM 8GB | SSD 256GB | PANTALLA 15.6 FHD | WINDOWS 11 PRO | TECLADO US",
price: 185000,
description:
"Slim-fitting style, contrast raglan long sleeve, three-button henley placket, light weight & soft fabric for breathable and comfortable wearing. And Solid stitched shirts with round neck made for durability and a great fit for casual fashion wear and diehard baseball fans. The Henley style round neckline includes a three-button placket.",
image:
"https://www.mastecnologia.com.ar/images/productos/90092.png?1654037680",
discount: 15,
stock: 5,
category:"NOTEBOOKS",
manufacturer:"DELL"
},
{
id: 5,
name: "MONITOR 19 LG LED 19M38A VGA",
price: 25000,
description:
"Slim-fitting style, contrast raglan long sleeve, three-button henley placket, light weight & soft fabric for breathable and comfortable wearing. And Solid stitched shirts with round neck made for durability and a great fit for casual fashion wear and diehard baseball fans. The Henley style round neckline includes a three-button placket.",
image:
"https://www.mastecnologia.com.ar/images/productos/90092.png?1654037680",
discount: 15,
stock: 5,
category:"MONITORS",
manufacturer:"LG"
},
{
id: 6,
name: "DISCO RIGIDO SSD 240GB GIGABYTE GP-GSTFS31240GNTD (10)",
price: 5000,
description:
"Slim-fitting style, contrast raglan long sleeve, three-button henley placket, light weight & soft fabric for breathable and comfortable wearing. And Solid stitched shirts with round neck made for durability and a great fit for casual fashion wear and diehard baseball fans. The Henley style round neckline includes a three-button placket.",
image:
"https://www.mastecnologia.com.ar/images/productos/12002.png?1652450047",
discount: 15,
stock: 5,
category:"DISK DRIVES",
manufacturer:"GIGABYTE"
},
{
id: 7,
name: "GAMEPAD SONY PS4 COPIA | JOYSTICK CAMUFLADO | PLACA ORIGINAL",
price: 7600,
description:
"Slim-fitting style, contrast raglan long sleeve, three-button henley placket, light weight & soft fabric for breathable and comfortable wearing. And Solid stitched shirts with round neck made for durability and a great fit for casual fashion wear and diehard baseball fans. The Henley style round neckline includes a three-button placket.",
image:
"https://www.mastecnologia.com.ar/images/productos/17172.png?1655230687",
discount: 15,
stock: 5,
category:"GAMERS",
manufacturer:"SONY"
},
{
id: 8,
name: "DISCO RIGIDO SSD 250GB KINGSTON M2 NV1 240GB",
price: 6600,
description:
"Slim-fitting style, contrast raglan long sleeve, three-button henley placket, light weight & soft fabric for breathable and comfortable wearing. And Solid stitched shirts with round neck made for durability and a great fit for casual fashion wear and diehard baseball fans. The Henley style round neckline includes a three-button placket.",
image:
"https://www.mastecnologia.com.ar/images/productos/12087.png?1653274937",
discount: 15,
stock: 5,
category:"DISK DRIVES",
manufacturer:"KINGSTON"
},
{
id: 9,
name: "DISCO RIGIDO 1TB SATA WD BLUE (20)",
price: 6200,
description:
"Slim-fitting style, contrast raglan long sleeve, three-button henley placket, light weight & soft fabric for breathable and comfortable wearing. And Solid stitched shirts with round neck made for durability and a great fit for casual fashion wear and diehard baseball fans. The Henley style round neckline includes a three-button placket.",
image:
"https://www.mastecnologia.com.ar/images/productos/12216.png?1653274941",
discount: 10,
stock: 10,
category:"DISK DRIVES",
manufacturer:"WESTERN DIGITAL"
},
{
id: 10,
name: "PLACA WIFI USB TP-LINK WN823N | 2.4GHZ 300MBPS | WPS",
price: 1450,
description:
"Slim-fitting style, contrast raglan long sleeve, three-button henley placket, light weight & soft fabric for breathable and comfortable wearing. And Solid stitched shirts with round neck made for durability and a great fit for casual fashion wear and diehard baseball fans. The Henley style round neckline includes a three-button placket.",
image:
"https://www.mastecnologia.com.ar/images/productos/14128.png?1653275076",
discount: 10,
stock: 10,
category:"PC COMPONENTS",
manufacturer:"TPLINK"
},
{
id: 11,
name: "MOUSE LOGITECH M110 USB GRIS",
price: 1350,
description:
"Slim-fitting style, contrast raglan long sleeve, three-button henley placket, light weight & soft fabric for breathable and comfortable wearing. And Solid stitched shirts with round neck made for durability and a great fit for casual fashion wear and diehard baseball fans. The Henley style round neckline includes a three-button placket.",
image:
"https://www.mastecnologia.com.ar/images/productos/17071.png?1653275254",
discount: 10,
stock: 10,
category:"MOUSE",
manufacturer:"LOGITECH"
},
{
id: 12,
name: "TECLADO NETMAK GAMER ZAKRO RETROILUMINADO NEGRO",
price: 890,
description:
"Slim-fitting style, contrast raglan long sleeve, three-button henley placket, light weight & soft fabric for breathable and comfortable wearing. And Solid stitched shirts with round neck made for durability and a great fit for casual fashion wear and diehard baseball fans. The Henley style round neckline includes a three-button placket.",
image:
"https://www.mastecnologia.com.ar/images/productos/17550.png?1653275278",
discount: 10,
stock: 10,
category:"KEYBOARDS",
manufacturer:"NETMAK"
},
{
id: 13,
name: "IMPRESORA HP M404DW PRO LASER BLANCO Y NEGRO",
price: 63548,
description:
"Slim-fitting style, contrast raglan long sleeve, three-button henley placket, light weight & soft fabric for breathable and comfortable wearing. And Solid stitched shirts with round neck made for durability and a great fit for casual fashion wear and diehard baseball fans. The Henley style round neckline includes a three-button placket.",
image:
"https://www.mastecnologia.com.ar/images/productos/15565.png?1653275194",
discount: 10,
stock: 10,
category:"PRINTERS",
manufacturer:"HP"
},
{
id: 14,
name: "SERVER DELL T40 XEON E3-2224 - 8GB RAM - DISCO RIGIDO 1TB - DVD",
price: 163548,
description:
"Slim-fitting style, contrast raglan long sleeve, three-button henley placket, light weight & soft fabric for breathable and comfortable wearing. And Solid stitched shirts with round neck made for durability and a great fit for casual fashion wear and diehard baseball fans. The Henley style round neckline includes a three-button placket.",
image:
"https://www.mastecnologia.com.ar/images/productos/94562.png?1653275772",
discount: 10,
stock: 10,
category:"CPU PROCESSORS",
manufacturer:"DELL"
},
{
id: 10,
name: "SanDisk SSD PLUS 1TB Internal SSD - SATA III 6 Gb/s",
price: 109,
description:
"Easy upgrade for faster boot up, shutdown, application load and response (As compared to 5400 RPM SATA 2.5” hard drive; Based on published specifications and internal benchmarking tests using PCMark vantage scores) Boosts burst write performance, making it ideal for typical PC workloads The perfect balance of performance and reliability Read/write speeds of up to 535MB/s/450MB/s (Based on internal testing; Performance may vary depending upon drive capacity, host device, OS and application.)",
image: "https://fakestoreapi.com/img/61U7T1koQqL._AC_SX679_.jpg",
category:"DISK DRIVES",
manufacturer:"SANDISK"
},
{
id: 11,
name:
"SSD Silicon Power 256GB 3D NAND A55 SLC Cache Performance Boost SATA III 2.5",
price: 109,
description:
"3D NAND flash are applied to deliver high transfer speeds Remarkable transfer speeds that enable faster bootup and improved overall system performance. The advanced SLC Cache Technology allows performance boost and longer lifespan 7mm slim design suitable for Ultrabooks and Ultra-slim notebooks. Supports TRIM command, Garbage Collection technology, RAID, and ECC (Error Checking & Correction) to provide the optimized performance and enhanced reliability.",
image: "https://fakestoreapi.com/img/71kWymZ+c+L._AC_SX679_.jpg",
category:"DISK DRIVES",
manufacturer:"SANDISK"
},
{
id: 12,
name:
"WD 4TB Gaming Drive Works with Playstation 4 Portable External Hard Drive",
price: 114,
description:
"Expand your PS4 gaming experience, Play anywhere Fast and easy, setup Sleek design with high capacity, 3-year manufacturer's limited warranty",
image: "https://fakestoreapi.com/img/61mtL65D4cL._AC_SX679_.jpg",
category:"DISK DRIVES",
manufacturer:"western digital"
},
{
id: 13,
name: "MONITOR Acer SB220Q bi 21.5 inches Full HD (1920 x 1080) IPS Ultra-Thin",
price: 599,
description:
"21. 5 inches Full HD (1920 x 1080) widescreen IPS display And Radeon free Sync technology. No compatibility for VESA Mount Refresh Rate: 75Hz - Using HDMI port Zero-frame design | ultra-thin | 4ms response time | IPS panel Aspect ratio - 16: 9. Color Supported - 16. 7 million colors. Brightness - 250 nit Tilt angle -5 degree to 15 degree. Horizontal viewing angle-178 degree. Vertical viewing angle-178 degree 75 hertz",
image: "https://fakestoreapi.com/img/81QpkIctqPL._AC_SX679_.jpg",
category:"MONITORS",
manufacturer:"ACER"
},
{
id: 14,
name:
"MONITOR Samsung 49-Inch CHG90 144Hz Curved Gaming Monitor (LC49HG90DMNXZA) – Super Ultrawide Screen QLED ",
price: 9999,
description:
"49 INCH SUPER ULTRAWIDE 32:9 CURVED GAMING MONITOR with dual 27 inch screen side by side QUANTUM DOT (QLED) TECHNOLOGY, HDR support and factory calibration provides stunningly realistic and accurate color and contrast 144HZ HIGH REFRESH RATE and 1ms ultra fast response time work to eliminate motion blur, ghosting, and reduce input lag",
image: "https://fakestoreapi.com/img/81Zt42ioCgL._AC_SX679_.jpg",
category:"MONITORS",
manufacturer:"SAMSUNG"
},
{
id: 14,
name:
"DELL INSPIRON I5406-3661SLV PUS | INTEL I3-1115G4 | RAM 8GB | SSD 256GB | PANTALLA 14 TOUCHSCREEN | WIN 10 H | TECLADO US",
price: 199999,
description:
"DELL INSPIRON I5406-3661SLV PUS | INTEL I3-1115G4 | RAM 8GB | SSD 256GB | PANTALLA 14 TOUCHSCREEN | WIN 10 H | TECLADO US",
image: "https://www.mastecnologia.com.ar/images/productos/90834.png?1655120231",
category:"NOTEBOOKS",
manufacturer:"DELL"
},
{
id: 14,
name:
"INTEL CORE I5 10400 (10MA GEN SOCKET 1200) (5)",
price: 59999,
description:
"INTEL CORE I5 10400 (10MA GEN SOCKET 1200) (5)",
image: "https://www.mastecnologia.com.ar/images/productos/10708.png?1653274860",
category:"CPU PROCESSORS",
manufacturer:"INTEL"
},
{
id: 14,
name:
"MINI PC INTEL NUC7CJYH BOXNUC7CJYHN1 PROCESADOR CELERON J4005",
price: 99123,
description:
"IMINI PC INTEL NUC7CJYH BOXNUC7CJYHN1 PROCESADOR CELERON J4005",
image: "https://www.mastecnologia.com.ar/images/productos/93510.png?1653275766",
category:"CPU PROCESSORS",
manufacturer:"INTEL"
},
{
id: 14,
name:
"ROUTER MESH TP-LINK DECO E4 (PACK X2)",
price: 19123,
description:
"ROUTER MESH TP-LINK DECO E4 (PACK X2)",
image: "https://www.mastecnologia.com.ar/images/productos/14312.png?1653275100",
category:"MODEM/ROUTER",
manufacturer:"TPLINK"
},
{
id: 14,
name:
"PEN DRIVE 32GB SANDISK BLADE",
price: 1223,
description:
"PEN DRIVE 32GB SANDISK BLADE",
image: "https://www.mastecnologia.com.ar/images/productos/93510.png?1653275766",
category:"PC COMPONENTS",
manufacturer:"SANDISK"
},
{
id: 14,
name:
"AMD RYZEN 5 5600G (AM4)",
price: 35223,
description:
"AMD RYZEN 5 5600G (AM4)",
image: "https://www.mastecnologia.com.ar/images/productos/10532.png?1653274855",
category:"CPU PROCESSORS",
manufacturer:"AMD"
},
{
id: 14,
name:
"AMD RYZEN 9 5900X (AM4) SIN COOLER/SIN VIDEO 5 GEN",
price: 45223,
description:
"AMD RYZEN 9 5900X (AM4) SIN COOLER/SIN VIDEO 5 GEN",
image: "https://www.mastecnologia.com.ar/images/productos/10531.png?1653274855",
category:"CPU PROCESSORS",
manufacturer:"AMD"
},
{
id: 14,
name:
"GEFORCE NVIDIA PNY RTX 3070TI 8GB DDR6 XLR8 EPIC-X-RGB VCG3070T8TFXPPB GFORCE",
price: 453223,
description:
"AGEFORCE NVIDIA PNY RTX 3070TI 8GB DDR6 XLR8 EPIC-X-RGB VCG3070T8TFXPPB GFORCE",
image: "https://www.mastecnologia.com.ar/images/productos/12702.png?1654089450",
category:"GRAPHICS CARDS",
manufacturer:"XFX"
},
{
name:
"AURICULAR NETMAK NM-COUNTER GAMER | 1 PLUG | PS4/XBOX/PC ROJO",
price: 3223,
description:
"AURICULAR NETMAK NM-COUNTER GAMER | 1 PLUG | PS4/XBOX/PC ROJO",
image: "https://www.mastecnologia.com.ar/images/productos/18804.png?1653275348",
category:"HEADPHONES",
manufacturer:"NETMAK"
},
{
name:
"MSI H510M-A PRO (1200) MOTHER95",
price: 3223,
description:
"MSI H510M-A PRO (1200) MOTHER95",
image: "https://www.mastecnologia.com.ar/images/productos/11718.png?1654036644",
category:"MOTHERBOARD",
manufacturer:"MSI"
},
{
name:
"MOUSE GENIUS DX-120 USB95",
price: 23,
description:
"MOUSE GENIUS DX-120 USB95",
image: "https://www.mastecnologia.com.ar/images/productos/17018.png?1652450347",
category:"MOUSE",
manufacturer:"GENIUS"
},
{
name:
"TECLADO+MOUSE LOGITECH MK235 INALAMBRICO WS95",
price: 4523,
description:
"TECLADO+MOUSE LOGITECH MK235 INALAMBRICO WS95",
image: "https://www.mastecnologia.com.ar/images/productos/17765.png?1653275296",
category:"KEYBOARDS",
manufacturer:"LOGITECH"
},
{
name:
"TECLADO LOGITECH K400 PLUS TOUCHPAD WS95",
price: 5523,
description:
"TECLADO LOGITECH K400 PLUS TOUCHPAD WS95",
image: "https://www.mastecnologia.com.ar/images/productos/17791.png?1652450395",
category:"KEYBOARDS",
manufacturer:"LOGITECH"
},
{
name:
"AURICULAR GAMER ST-CONQUER | 2 PLUG 95",
price: 5523,
description:
"AURICULAR GAMER ST-CONQUER | 2 PLUG 95",
image: "https://www.mastecnologia.com.ar/images/productos/18836.png?1653275353",
category:"HEADPHONES",
manufacturer:"HYPERX"
},
{
name:
"GEFORCE NVIDIA PNY RTX2060 12GB DDR6 VCG206012DFPPB GFORCE 95",
price: 67823,
description:
"GEFORCE NVIDIA PNY RTX2060 12GB DDR6 VCG206012DFPPB GFORCE 95",
image: "https://www.mastecnologia.com.ar/images/productos/12508.png?1653274955",
category:"GRAPHICS CARDS",
manufacturer:"XFX"
},
{
name:
"IMPRESORA EPSON L3210 (MF) MULTIFUNCION ECOTANK + COMBO TINTA",
price: 55523,
description:
"IMPRESORA EPSON L3210 (MF) MULTIFUNCION ECOTANK + COMBO TINTA",
image: "https://www.mastecnologia.com.ar/images/productos/15645.png?1652450296",
category:"PRINTERS",
manufacturer:"EPSON"
},
{
name:
"SILLA GAMER NOGA STORMER TYPHON RGB ANJ-1175 NEGRA95",
price: 65523,
description:
"SILLA GAMER NOGA STORMER TYPHON RGB ANJ-1175 NEGRA95",
image: "https://www.mastecnologia.com.ar/images/productos/97750.png?1653748859",
category: "GAMERS",
manufacturer: "HYPERX"
},
{
name:
"SILLA GAMER NETMAK NM-PHONTUM AZUL",
price: 65523,
description:
"SILLA GAMER NETMAK NM-PHONTUM AZUL",
image: "https://www.mastecnologia.com.ar/images/productos/97756.png?1653275811",
category: "GAMERS",
manufacturer: "NETMAK"
},
{
name:
"KIT ALARMA MARSHALL GO PLUS PANEL MARSHALL GO+ 1 SENSOR INALAMBRICO + 1 SENSOR MAGNETICO",
price: 6523,
description:
"KIT ALARMA MARSHALL GO PLUS PANEL MARSHALL GO+ 1 SENSOR INALAMBRICO + 1 SENSOR MAGNETICO + CONTROL + BATERIA + SIRENA + ROTULA95",
image: "https://www.mastecnologia.com.ar/images/productos/91279.png?1653275757",
category: "MODEM ROUTER",
manufacturer: "MARSHALL"
},
{
name:
"PEN DRIVE 32GB KINGSTON EXODIA 3.2 NARANJA95",
price: 6523,
description:
"PEN DRIVE 32GB KINGSTON EXODIA 3.2 NARANJA95",
image: "https://www.mastecnologia.com.ar/images/productos/15734.png?1655225629",
category: "PC COMPONENTS",
manufacturer: "KINGSTON"
},
{
name:
"DDR4 4GB 2666 KINGSTON95",
price: 37,
description:
"DDR4 4GB 2666 KINGSTON95",
image: "https://www.mastecnologia.com.ar/images/productos/13550.png?1653275029",
category: "MEMORY RAM",
manufacturer: "KINGSTON"
},
{
name:
"DDR4 16GB 3200 KINGSTON HYPERX FURY BEAST RGB95",
price: 132,
description:
"DDR4 16GB 3200 KINGSTON HYPERX FURY BEAST RGB95",
image: "https://www.mastecnologia.com.ar/images/productos/13554.png?1653275030",
category: "MEMORY RAM",
manufacturer: "KINGSTON"
},
{
name:
"DDR4 32GB 3600 KINGSTON FURY RENEGADE RGB95",
price: 294,
description:
"DDR4 32GB 3600 KINGSTON FURY RENEGADE RGB95",
image: "https://www.mastecnologia.com.ar/images/productos/13413.png?1653275012",
category: "MEMORY RAM",
manufacturer: "KINGSTON"
},
{
name:
"ASUS PRIME A520M-K (AM4) MOTHER95",
price: 97,
description:
"ASUS PRIME A520M-K (AM4) MOTHER95",
image: "https://www.mastecnologia.com.ar/images/productos/11197.png?1653274893",
category: "MOTHERBOARD",
manufacturer: "ASUS"
},
{
name:
"GIGABYTE B550M DS3H 1.2 (AM4) MOTHER95",
price: 150,
description:
"GIGABYTE B550M DS3H 1.2 (AM4) MOTHER95",
image: "https://www.mastecnologia.com.ar/images/productos/11143.png?1652450012",
category: "MOTHERBOARD",
manufacturer: "GIGABYTE"
},
{
name:
"GIGABYTE B660M DS3H DDR4 (1700) MOTHER95",
price: 236,
description:
"GIGABYTE B660M DS3H DDR4 (1700) MOTHER95",
image: "https://www.mastecnologia.com.ar/images/productos/11153.png?1653274886",
category: "MOTHERBOARD",
manufacturer: "GIGABYTE"
},
{
name:
"GABINETE SENTEY Z20 4295-SF2 RGB95",
price: 188,
description:
"GABINETE SENTEY Z20 4295-SF2 RGB95",
image: "https://www.mastecnologia.com.ar/images/productos/91025.png?1653275743",
category: "COMPUTER CASES",
manufacturer: "SENTEY"
},
{
name:
"GABINETE GAMER XFX GC-09HE - 2 COOLER 200MM + 1 120MM RGB95",
price: 195,
description:
"GABINETE GAMER XFX GC-09HE - 2 COOLER 200MM + 1 120MM RGB95",
image: "https://www.mastecnologia.com.ar/images/productos/91107.png?1653275750",
category: "COMPUTER CASES",
manufacturer: "XFX"
},
{
name:
"GABINETE SENTEY K20 FULL 4297-SF RGB 95",
price: 165,
description:
"GABINETE SENTEY K20 FULL 4297-SF RGB 95",
image: "https://www.mastecnologia.com.ar/images/productos/91024.png?1653275743",
category: "COMPUTER CASES",
manufacturer: "SENTEY"
},
{
name: "INTEL CORE I9 12900 (LGA 1700)95",
price: 776,
description:
"INTEL CORE I9 12900 (LGA 1700)95",
image: "https://www.mastecnologia.com.ar/images/productos/10908.png?1654827704",
category: "CPU PROCESSORS",
manufacturer: "INTEL"
},
{
name: "GIGABYTE AMD RADEON RX6650 XT 8GB DDR6 GAMING OC 3X FANS GV-R665XTGAMING OC-8GD95",
price: 925,
description:
"GIGABYTE AMD RADEON RX6650 XT 8GB DDR6 GAMING OC 3X FANS GV-R665XTGAMING OC-8GD95",
image: "https://www.mastecnologia.com.ar/images/productos/12504.png?1653748857",
category: "GRAPHICS CARDS",
manufacturer: "GIGABYTE"
},
{
name: "AMD ASROCK RX6500XT 4GB DDR6 OC PHANTON GAMING 90-GA3DZZ-00UANH95",
price: 463,
description:
"AMD ASROCK RX6500XT 4GB DDR6 OC PHANTON GAMING 90-GA3DZZ-00UANH95",
image: "https://www.mastecnologia.com.ar/images/productos/12572.png?1653274971",
category: "GRAPHICS CARDS",
manufacturer: "AMD"
},
];
const users = [
{
name: "Bettina",
email: "[email protected]",
password: "123456",
admin: true,
isactive: true
},
{
name: "Enzo",
email: "[email protected]",
password: "123456",
admin: true,
isactive: true
},
{
name: "Lucas",
email: "[email protected]",
password: "123456",
admin: true,
isactive: true
},
{
name: "Nicolas",
email: "[email protected]",
password: "123456",
admin: true,
isactive: true
},
{
name: "FedeF",
email: "[email protected]",
password: "123456",
admin: true,
isactive: true
},
{
name: "FedeR",
email: "[email protected]",
password: "123456",
admin: true,
isactive: true
},
{
name: "Gabriel",
email: "[email protected]",
password: "123456",
admin: true,
isactive: true
},
{
name: "Horacio",
email: "[email protected]",
password: "123456",
admin: true,
isactive: true
},
{
name: "Juan",
email: "[email protected]",
password: "123456",
admin: false,
isactive: true
},
{
name: "Pedro",
email: "[email protected]",
password: "123456",
admin: false,
isactive: true
},
]
const catego = [
{
name: "PC COMPONENTS"
},
{
name: "HEADPHONES"
},
{
name: "KEYBOARDS"
},
{
name: "MOUSE"
},
{
name: "NOTEBOOKS"
},
{
name: "MONITORS"
},
{
name: "DISK DRIVES"
},
{
name: "GRAPHICS CARDS"
},
{
name: "CPU PROCESSORS"
},
{
name: "MODEM ROUTER"
},
{
name: "PRINTERS"
},
{
name: "GAMERS"
},
{
name: "MEMORY RAM"
},
{
name: "MOTHERBOARD"
},
{
name: "COMPUTER CASES"
},
]
const manu = [
{
name: "AMD",
image: "https://www.mastecnologia.com.ar/assets/images/brands/amd.png",
},
{
name: "INTEL",
image: "https://www.mastecnologia.com.ar/assets/images/brands/intel.png",
},
{
name: "TENDA",
image: "https://www.mastecnologia.com.ar/assets/images/brands/tenda.png",
},
{
name: "GLC",
image: "https://www.mastecnologia.com.ar/assets/images/brands/glc.png",
},
{
name: "TPLINK",
image: "https://www.mastecnologia.com.ar/assets/images/brands/tplink.png",
},
{
name: "KINGSTON",
image: "https://www.mastecnologia.com.ar/assets/images/brands/kingston.jpg",
},
{
name: "HP",
image: "https://upload.wikimedia.org/wikipedia/commons/thumb/3/33/Logo_HP.PNG/640px-Logo_HP.PNG",
},
{
name: "GIGABYTE",
image: "https://1000marcas.net/wp-content/uploads/2020/02/Logo-Gigabyte.png",
},
{
name: "HYPERX",
image: "https://iconape.com/wp-content/png_logo_vector/hyperx.png",
},
{
name: "XFX",
image: "https://www.logolynx.com/images/logolynx/b3/b35406e70030781a1dd16734e9f1c802.jpeg",
},
{
name: "DAHUA",
image: "https://www.camaras-termograficas.org/wp-content/uploads/2021/03/camaras-termicas-dahua.jpg",
},
{
name: "MARSHALL",
image: "https://www.gmkfreelogos.com/logos/M/img/marshall_logo.gif",
},{
name: "APPLE",
image: "https://thephonemarket.com.co/wp-content/uploads/2020/07/apple.jpg",
},
{
name: "GENIUS",
image: "https://www.vector-logo.net/logo_preview/eps/g/Genius(167).png",
},
{
name: "ASUS",
image: "https://www.mastecnologia.com.ar/assets/images/brands/asus.png",
},
{
name: "SONY",
image: "https://cdn4.iconfinder.com/data/icons/flat-brand-logo-2/512/sony-256.png",
},
{
name: "LG",
image: "https://cdn4.iconfinder.com/data/icons/flat-brand-logo-2/512/lg-256.png",
},
{
name: "SAMSUNG",
image: "https://cdn4.iconfinder.com/data/icons/flat-brand-logo-2/512/samsung-128.png",
},
{
name: "IBM",
image: "https://logodownload.org/wp-content/uploads/2014/04/ibm-logo-0.png",
},
{
name: "ACER",
image: "https://www.brandemia.org/wp-content/uploads/2011/04/acer1.jpg",
},
{
name: "TVR",
image: "https://www.mastecnologia.com.ar/assets/images/brands/trv.png",
},
{
name: "NVIDIA",
image: "https://www.mastecnologia.com.ar/assets/images/brands/nvidia.png",
},
{
name: "RADEON",
image: "https://www.mastecnologia.com.ar/assets/images/brands/radeon.png",
},
{
name: "LENOVO",
image: "https://www.tecnologia-informatica.com/wp-content/uploads/2019/02/marcas-de-computadoras-3.jpeg",
},
{
name: "DELL",
image: "https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Dell_Logo.svg/300px-Dell_Logo.svg.png",
},
{
name: "NOX",
image: "http://www.padelspain.net/userfiles/Entrevista_Angel_Ballve_NOX_La_voz_del_padel_fuera_buena.jpg",
},
{
name: "SANDISK",
image: "https://www.qloud.ar/SITES/IMG/celsus-store-05-2022/262_13-05-2022-02-05-22-sandisk.jpg",
},{
name: "NETMAK",
image: "https://d3ugyf2ht6aenh.cloudfront.net/stores/001/156/703/products/logo-netmak1-b6a07641acec682d0916014783019192-640-0.png",
},
{
name: "LOGITECH",
image: "https://ih1.redbubble.net/image.2253355026.1487/st,small,507x507-pad,600x600,f8f8f8.jpg",
},
{
name: "MSI",
image: "https://guide-images.cdn.ifixit.com/igi/2T1loyBcOBV1hKNu.large",
},
{
name: "EPSON",
image: "https://i.pinimg.com/originals/33/77/64/3377649c5b68ee7ca92d217f9a6040d6.jpg",
},
{
name: "WESTERN DIGITAL",
image: "https://i.pinimg.com/originals/33/77/64/3377649c5b68ee7ca92d217f9a6040d6.jpg",
},
{
name: "SENTEY",
image: "https://iconape.com/wp-content/png_logo_vector/sentey.png",
},
]
const createUsers = async () => {
for (let i = 0; i < users.length; i++) {
let passwordcrypt = bcrypt.hashSync(users[i].password, Number.parseInt(10));
// Crear un usuario
await User.create({
name: users[i].name,
email: users[i].email,
password: passwordcrypt,
admin: users[i].admin,
isactive: users[i].isactive
})
console.log(`Usuario: ${users[i].name} - PASS:${users[i].password} CREADO...`)
}
}
const createProducts = async (name, price, description, image, category, manufacturer) => {
let newProduct = await Product.create({
name: name,
price: price,
discount: 10,
stock: 150,
description: description,
image: image
})
if (category) {category = category.toUpperCase();
let categoryDb = await Categories.findAll({ where: { name: category } });
await newProduct.addCategories(categoryDb);}
if (manufacturer) {manufacturer = manufacturer.toUpperCase();
let manufacturerDb = await Manufacturer.findAll({where: { name: manufacturer },});
await newProduct.addManufacturer(manufacturerDb);}
};
createCategories = async () => {
for(let i = 0; i < catego.length; i++){
await Categories.create({
name: catego[i].name
})
}
};
createManufacturers = async () => {
for(let i = 0; i < manu.length; i++){
await Manufacturer.create({
name: manu[i].name,
image: manu[i].image
})
}
};
await createUsers();
console.log('USUARIOS CREADOS');
await createManufacturers();
console.log("termine manu")
await createCategories();
console.log("termine cate")
for (let i = 0; i < products.length; i++) {
let price = products[i].price;
let name = products[i].name
let image = products[i].image;
let descrpition = products[i].description;
let manufacturer = products[i].manufacturer;
let category = products[i].category;
await createProducts(name, price, descrpition, image, category, manufacturer);
}
console.log("termine products")
}
module.exports={
initDb
}