-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbartermate (1).sql
678 lines (571 loc) · 22.8 KB
/
bartermate (1).sql
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
-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 15, 2023 at 07:14 PM
-- Server version: 10.4.24-MariaDB
-- PHP Version: 8.1.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `bartermate`
--
-- --------------------------------------------------------
--
-- Table structure for table `inbox`
--
CREATE TABLE `inbox` (
`I_ID` int(11) NOT NULL,
`I_OF` int(11) NOT NULL,
`I_U_ID` int(11) NOT NULL,
`I_CREATE_TIME` timestamp(6) NOT NULL DEFAULT current_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `inbox`
--
INSERT INTO `inbox` (`I_ID`, `I_OF`, `I_U_ID`, `I_CREATE_TIME`) VALUES
(3, 5, 6, '2021-08-17 18:04:31.675844'),
(4, 5, 7, '2021-08-17 18:09:16.944967'),
(5, 6, 7, '2021-08-18 20:05:31.510502'),
(6, 5, 5, '2021-08-28 08:23:02.340419');
-- --------------------------------------------------------
--
-- Table structure for table `messages`
--
CREATE TABLE `messages` (
`M_ID` int(11) NOT NULL,
`M_CONTENT` text NOT NULL,
`M_FROM` int(11) NOT NULL,
`M_TO` int(11) NOT NULL,
`M_TIME` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `messages`
--
INSERT INTO `messages` (`M_ID`, `M_CONTENT`, `M_FROM`, `M_TO`, `M_TIME`) VALUES
(129, 'assas', 5, 6, '2021-08-11 06:57:02'),
(130, 'oke', 5, 6, '2021-08-11 06:57:09'),
(131, 'lol', 5, 6, '2021-08-11 06:57:12'),
(139, 'hi', 5, 6, '2021-08-12 08:18:37'),
(140, 'hello', 6, 5, '2021-08-15 07:42:59'),
(141, 'how is u boii', 6, 5, '2021-08-15 07:43:05'),
(142, 'hello', 6, 7, '2021-08-15 07:43:13'),
(143, 'i am underwaater', 6, 7, '2021-08-15 07:43:19'),
(144, 'pls help', 6, 7, '2021-08-15 07:43:22'),
(145, 'nice hwisu', 5, 6, '2021-08-17 12:55:01'),
(146, 'ok', 6, 7, '2021-08-19 10:03:23'),
(147, 'SHUT UPP...', 7, 6, '2021-08-19 02:30:47'),
(148, 'hello', 7, 5, '2021-08-23 03:52:17'),
(149, 'hi', 5, 7, '2021-08-23 03:52:25'),
(150, 'by', 7, 5, '2021-08-23 03:52:32'),
(151, 'ki haal hai paaji', 5, 7, '2021-08-23 04:39:11'),
(152, 'lol', 7, 5, '2021-08-23 04:39:18'),
(153, 'hi', 5, 7, '2021-08-23 04:41:19'),
(154, 'hi', 7, 5, '2021-08-23 04:41:39'),
(155, 'fine', 6, 5, '2021-08-24 10:45:50'),
(156, 'hi', 5, 6, '2021-08-25 04:28:28'),
(157, 'hellow', 6, 5, '2021-08-25 04:30:38'),
(158, 'bye bye', 6, 5, '2021-08-25 04:30:46'),
(159, 'han bhai', 6, 5, '2021-08-25 04:32:25'),
(160, 'tabs kese banayei vey', 6, 5, '2021-08-25 04:32:29'),
(161, 'bata muhjhey', 6, 5, '2021-08-25 04:32:35'),
(162, 'yt tutorial', 5, 6, '2021-08-25 04:32:42'),
(163, 'very good idea', 6, 5, '2021-08-25 04:32:47'),
(164, 'tujjey pata hai', 6, 5, '2021-08-25 04:32:52'),
(165, 'nice :)', 5, 6, '2021-08-25 04:32:55'),
(166, '5th ki deadline mili hai', 6, 5, '2021-08-25 04:32:56'),
(167, 'internal', 6, 5, '2021-08-25 04:32:58'),
(168, 'han tu toh karlega kaa', 5, 6, '2021-08-25 04:33:09'),
(169, 'kaam*', 5, 6, '2021-08-25 04:33:14'),
(170, 'han han mera tou ho jaye ga', 6, 5, '2021-08-25 04:33:22'),
(171, ':poop:', 5, 6, '2021-08-25 04:33:28'),
(172, 'baaki website wali end ka kaam complete hai?', 6, 5, '2021-08-25 04:33:29'),
(173, 'nope', 5, 6, '2021-08-25 04:33:41'),
(174, '50% complete', 5, 6, '2021-08-25 04:33:45'),
(175, '~\"\"~', 6, 5, '2021-08-25 04:33:49'),
(176, 'shit yaar', 6, 5, '2021-08-25 04:33:53'),
(177, 'kab tak khatam hoga', 6, 5, '2021-08-25 04:33:58'),
(178, 'lol lag gaye', 5, 6, '2021-08-25 04:34:00'),
(179, 'shit', 6, 5, '2021-08-25 04:34:16'),
(180, 'chup kr k bto', 6, 5, '2021-08-25 04:39:11'),
(181, 'ok', 5, 6, '2021-08-25 04:39:31'),
(182, 'svdv', 6, 5, '2021-08-25 04:40:29'),
(183, 'hey', 5, 6, '2021-08-30 08:39:32'),
(184, 'hi', 5, 6, '2021-08-30 08:41:33'),
(187, 'hey', 5, 6, '2021-08-30 09:04:39'),
(190, 'kya he?', 5, 7, '2021-09-01 04:36:01'),
(191, 'lul', 5, 6, '2021-09-01 04:48:47'),
(192, 'lol*', 5, 6, '2021-09-01 04:49:21'),
(193, 'hey', 5, 6, '2021-09-01 05:09:16'),
(194, 'hey', 6, 5, '2021-09-08 09:38:43'),
(195, 'ok ', 6, 5, '2021-09-22 02:35:33');
-- --------------------------------------------------------
--
-- Table structure for table `products`
--
CREATE TABLE `products` (
`P_ID` int(11) NOT NULL,
`P_NAME` text NOT NULL,
`P_DESC` text NOT NULL,
`P_CATEGORY` int(11) NOT NULL,
`P_EXC_TYPE` int(11) NOT NULL,
`P_MONETARY_VAL` int(11) DEFAULT NULL,
`P_VIEWS` int(11) NOT NULL DEFAULT 0,
`P_CREATE_DATE` text NOT NULL DEFAULT current_timestamp(),
`P_BY_U_ID` int(11) NOT NULL,
`P_FEATURED` int(11) NOT NULL DEFAULT 0,
`P_STATUS` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `products`
--
INSERT INTO `products` (`P_ID`, `P_NAME`, `P_DESC`, `P_CATEGORY`, `P_EXC_TYPE`, `P_MONETARY_VAL`, `P_VIEWS`, `P_CREATE_DATE`, `P_BY_U_ID`, `P_FEATURED`, `P_STATUS`) VALUES
(32, 'Premium Quality Wallpapers', 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. Minima molestiae, assumenda vitae consequatur sequi velit hic dolor provident ipsum? Soluta maxime incidunt non corporis dolores possimus et mollitia nam. Animi!\r\nEveniet molestias veniam, velit voluptatum at placeat, sed deserunt, laboriosam enim voluptate inventore. Aut quia facere dicta eius quos voluptates, impedit. Consectetur quas voluptatibus quo, laboriosam nobis quod, porro repudiandae.\r\nOfficia iste, tempora quod dolorem. Praesentium, labore non architecto voluptate, laudantium totam. Nulla iste facilis magni expedita, asperiores, architecto sunt nisi, dolorem ipsum magnam sint corporis tenetur, dicta temporibus eaque.\r\nEum atque, quis est, distinctio, ipsa commodi porro, libero doloribus dicta ad ratione dolores mollitia fugit sunt tenetur! Incidunt alias laudantium quibusdam magnam nulla sunt omnis, dolorem consequuntur accusantium recusandae.\r\nBlanditiis porro, laboriosam eum nam, repellat veritatis soluta quisquam, quidem quas assumenda quod aut qui a. Numquam, veniam, exercitationem! Porro aut vitae fuga veniam vel. Odio, odit optio repudiandae voluptatum!', 3, 0, 999, 31, ' 2020-11-03 ', 5, 1, 1),
(33, 'Stock Images', 'Lorem ipsum dolor sit amet consectetur adipisicing, elit. Impedit quidem commodi voluptates ut architecto eaque nostrum autem error, ab. Perferendis adipisci libero quas, hic molestiae accusantium laudantium ratione ipsum porro.\r\nVeniam nostrum sed magnam ullam vel eligendi suscipit magni! Incidunt rerum cumque, esse, accusantium quibusdam repellendus. Asperiores et dicta ullam, doloremque dolorum, tempora quod nulla laudantium repudiandae numquam provident tenetur?\r\nVoluptatem, maiores? Enim, ullam, molestiae? Quasi quaerat debitis possimus. Nesciunt natus nisi aperiam iusto nulla ut dolorem, culpa, corporis unde voluptatum, magni quod beatae quibusdam quae cum hic voluptates atque.\r\nRem placeat dolorem voluptatibus tenetur cum suscipit sed dolores animi quis alias nisi, maxime illum eaque consectetur, vel aliquam quam accusantium vero aliquid, voluptas ex? Architecto, a ratione ipsam accusantium.', 3, 0, 500, 58, '2021-06-30', 6, 0, 1),
(34, 'Candles', 'Homemade MagicLune Candles. Made from 100% Natural Material that are Eco-Friendly & Animal Cruelty Free.', 3, 0, 399, 8, '2021-07-03', 5, 0, 1),
(36, 'Tom & Jerry Memes', 'Meme Templates For Tom & Jerry. ', 7, 1, 0, 11, '2021-07-03', 5, 0, 1),
(37, 'Flat-Icon Stock Images', 'Cheap Stock Images Available with Full Quality and Vector Quality SVG Images. discount if you buy multiple.', 8, 1, 0, 94, '2021-07-09', 6, 0, 1),
(38, 'Letter Head', 'Real Letter From Queen Elizabeth. 100% Jenuine Material Certified by Whatsapp University.', 7, 1, 0, 6, '2021-07-21', 5, 0, 1),
(39, 'Tech Products Sale', 'Sale On Tech Products, Get Anything Under 10$ Yes You Saw that correct 10$!! Buy Now and get advantage of this amazing offer.', 1, 1, 0, 43, '2021-08-17', 7, 0, 1),
(40, 'Admin Panel', 'Custom Admin Panel, Can make Custom or on Wordpress.', 1, 1, 0, 16, '2021-08-23', 5, 0, 1),
(89, 'Banner Design', 'Designing Banners & Thumbnails For a Low Price! Offering Pixel Perfect, Clean and Crisp Designs with Full Money Back Guarantee. Contact Us For Custom Designs', 8, 0, 1499, 9, '2021-08-28', 7, 0, 1),
(92, 'Book Cover Design', 'Designing Good Quality Book Covers. Contact For More Details', 8, 0, 250, 10, '2021-08-28', 7, 0, 1),
(93, 'Custom Photography', 'Name the Place, We Take the Picture. So eZ.', 8, 0, 499, 3, '2021-08-28', 6, 0, 1),
(94, 'Banner Creation | Canva®', 'Good Quality Banner Creation Using Canva®.', 8, 0, 49, 7, '2021-08-28', 6, 0, 1);
-- --------------------------------------------------------
--
-- Table structure for table `product_categories`
--
CREATE TABLE `product_categories` (
`PC_ID` int(11) NOT NULL,
`PC_NAME` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `product_categories`
--
INSERT INTO `product_categories` (`PC_ID`, `PC_NAME`) VALUES
(1, 'Electronics'),
(2, 'Vehicles'),
(3, 'Decorations'),
(4, 'Kitchen Appliances'),
(5, 'Furniture'),
(6, 'Books'),
(7, 'Accessories'),
(8, 'Digital Service');
-- --------------------------------------------------------
--
-- Table structure for table `product_exchange_prefs`
--
CREATE TABLE `product_exchange_prefs` (
`PE_ID` int(11) NOT NULL,
`PE_P_ID` int(11) NOT NULL,
`PE_PC_ID` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `product_exchange_prefs`
--
INSERT INTO `product_exchange_prefs` (`PE_ID`, `PE_P_ID`, `PE_PC_ID`) VALUES
(47, 36, 1),
(48, 36, 7),
(49, 37, 2),
(50, 37, 7),
(51, 38, 5),
(52, 38, 7),
(53, 39, 5),
(54, 39, 7),
(55, 40, 1);
-- --------------------------------------------------------
--
-- Table structure for table `product_exchange_status`
--
CREATE TABLE `product_exchange_status` (
`PES_ID` int(11) NOT NULL,
`PES_NAME` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `product_exchange_status`
--
INSERT INTO `product_exchange_status` (`PES_ID`, `PES_NAME`) VALUES
(1, 'In Progress'),
(2, 'Canceled'),
(3, 'Completed');
-- --------------------------------------------------------
--
-- Table structure for table `product_images`
--
CREATE TABLE `product_images` (
`PI_ID` int(11) NOT NULL,
`PI_P_ID` int(11) NOT NULL,
`PI_IMG_URL` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `product_images`
--
INSERT INTO `product_images` (`PI_ID`, `PI_P_ID`, `PI_IMG_URL`) VALUES
(2, 32, 'assets/product_images/60d9c8bc1f4541.10566528.webp'),
(3, 32, 'assets/product_images/60d9c8bc3fd7b9.84881232.webp'),
(4, 32, 'assets/product_images/60d9c8bc56bfa0.73761430.webp'),
(5, 33, 'assets/product_images/60dc44293310d5.69336412.webp'),
(6, 33, 'assets/product_images/60dc44296dd722.25193693.webp'),
(7, 33, 'assets/product_images/60dc44298419f6.65721317.webp'),
(8, 33, 'assets/product_images/60dc4429b96243.67035976.webp'),
(9, 33, 'assets/product_images/60dc4429c78871.35446726.webp'),
(10, 33, 'assets/product_images/60dc4429d98398.52631280.webp'),
(11, 34, 'assets/product_images/60e04777347939.35504217.webp'),
(12, 34, 'assets/product_images/60e04777616d55.74649105.webp'),
(13, 34, 'assets/product_images/60e04777726536.82078100.webp'),
(15, 36, 'assets/product_images/60e04fa477c250.07221414.webp'),
(16, 36, 'assets/product_images/60e04fa49a1655.16732006.webp'),
(17, 36, 'assets/product_images/60e04fa4b9b443.26340974.webp'),
(18, 37, 'assets/product_images/60e8047497a6d7.29369477.webp'),
(19, 37, 'assets/product_images/60e80474d03139.85589889.webp'),
(20, 37, 'assets/product_images/60e80474ed1c27.41744604.webp'),
(21, 38, 'assets/product_images/60f83dc77b0629.96685190.webp'),
(22, 39, 'assets/product_images/611bfb33a5a090.06984870.webp'),
(23, 39, 'assets/product_images/611bfb33caa647.29422711.webp'),
(24, 40, 'assets/product_images/6123d3d936a053.53945739.webp'),
(173, 89, 'assets/product_images/612a01fc6ea434.09707915.webp'),
(174, 89, 'assets/product_images/612a01fc858506.36968054.webp'),
(175, 89, 'assets/product_images/612a01fc9656d7.06497654.webp'),
(182, 92, 'assets/product_images/612a04ae6e84b5.82856388.webp'),
(183, 92, 'assets/product_images/612a04ae9e6928.45700365.webp'),
(184, 92, 'assets/product_images/612a04aeb4c041.12787768.webp'),
(185, 93, 'assets/product_images/612a070fbffc11.98078102.webp'),
(186, 93, 'assets/product_images/612a070fd15fb5.11189356.webp'),
(187, 93, 'assets/product_images/612a070fe506e8.76149671.webp'),
(188, 94, 'assets/product_images/612a08faef96b5.75469749.webp'),
(189, 94, 'assets/product_images/612a08fb3e2418.37875314.webp');
-- --------------------------------------------------------
--
-- Table structure for table `product_status`
--
CREATE TABLE `product_status` (
`PS_ID` int(11) NOT NULL,
`PS_NAME` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `product_status`
--
INSERT INTO `product_status` (`PS_ID`, `PS_NAME`) VALUES
(1, 'Active'),
(2, 'Inactive'),
(3, 'Exchanged');
-- --------------------------------------------------------
--
-- Table structure for table `product_swaps`
--
CREATE TABLE `product_swaps` (
`PS_ID` int(11) NOT NULL,
`PS_P_FOR` int(11) NOT NULL,
`PS_BY` int(11) NOT NULL,
`PS_STATUS` int(11) NOT NULL DEFAULT 1,
`PS_DATE` date NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `product_swaps`
--
INSERT INTO `product_swaps` (`PS_ID`, `PS_P_FOR`, `PS_BY`, `PS_STATUS`, `PS_DATE`) VALUES
(2, 37, 7, 1, '2021-09-14'),
(4, 39, 6, 1, '2021-09-16'),
(5, 37, 5, 1, '2021-09-19'),
(6, 40, 6, 1, '2021-09-20');
-- --------------------------------------------------------
--
-- Table structure for table `product_swap_offers`
--
CREATE TABLE `product_swap_offers` (
`SO_ID` int(11) NOT NULL,
`SO_PS_ID` int(11) NOT NULL,
`SO_P_ID` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `product_swap_offers`
--
INSERT INTO `product_swap_offers` (`SO_ID`, `SO_PS_ID`, `SO_P_ID`) VALUES
(4, 2, 92),
(5, 2, 89),
(6, 2, 39),
(10, 4, 33),
(11, 4, 37),
(12, 4, 93),
(13, 5, 32),
(14, 5, 40),
(15, 5, 34),
(16, 6, 93),
(17, 6, 94),
(18, 6, 33);
-- --------------------------------------------------------
--
-- Table structure for table `product_swap_status`
--
CREATE TABLE `product_swap_status` (
`SS_ID` int(11) NOT NULL,
`SS_NAME` text NOT NULL,
`SS_COLOR` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `product_swap_status`
--
INSERT INTO `product_swap_status` (`SS_ID`, `SS_NAME`, `SS_COLOR`) VALUES
(1, 'Offer Sent', 'primary'),
(2, 'Offer Accepted', 'success'),
(3, 'Offer Expired', 'secondary');
-- --------------------------------------------------------
--
-- Table structure for table `saved_products`
--
CREATE TABLE `saved_products` (
`S_ID` int(11) NOT NULL,
`S_P_ID` int(11) NOT NULL,
`S_BY_U_ID` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `saved_products`
--
INSERT INTO `saved_products` (`S_ID`, `S_P_ID`, `S_BY_U_ID`) VALUES
(57, 36, 7),
(60, 32, 7),
(158, 94, 6),
(159, 32, 5),
(161, 37, 5);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`U_ID` int(11) NOT NULL,
`U_NAME` text NOT NULL,
`U_EMAIL` text NOT NULL,
`U_PASS` text NOT NULL,
`U_PHONE` text NOT NULL,
`U_IMG_URL` text NOT NULL DEFAULT 'assets/img/user_default.svg',
`U_VER` int(11) NOT NULL DEFAULT 0,
`U_VER_EMAIL` int(11) NOT NULL DEFAULT 0,
`U_VER_CODE` text NOT NULL DEFAULT '-',
`U_V_COINS` int(11) NOT NULL DEFAULT 0,
`U_A_CREATE_DATE` datetime NOT NULL DEFAULT current_timestamp(),
`U_LAST_ACTIVITY` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`U_ID`, `U_NAME`, `U_EMAIL`, `U_PASS`, `U_PHONE`, `U_IMG_URL`, `U_VER`, `U_VER_EMAIL`, `U_VER_CODE`, `U_V_COINS`, `U_A_CREATE_DATE`, `U_LAST_ACTIVITY`) VALUES
(5, 'Ronit Rai', 'ronitrai.rk@gmail.com', 'abc123', '3164038778', 'assets/dp_uploads/5f880b3f7b28e6.58356572.jpeg', 1, 1, 'c7e708490ab49fa18115238cd5938e4d', 0, '2021-08-01 21:44:31', ''),
(6, 'Adarsh Nandlel', 'adarshkessani@gmail.com', 'abc123', '111244622', 'assets/img/user_default.svg', 1, 1, '51f80d3e903007be3be3e0031197eb26', 0, '2021-08-01 21:44:31', ''),
(7, 'Admin User', 'admin@a.com', 'abc123', '3160001457', 'assets/img/user_default.svg', 1, 1, 'adnaugd712hd1i2y8712e2i1d', 0, '2021-08-11 22:23:10', ''),
(18, 'Somesh', 'somesh@gmail.com', 'abc123', '3032995458', '', 0, 0, '5064b6a48442d83e8241d5a82d3bb8ad', 0, '2021-09-12 21:50:17', '');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `inbox`
--
ALTER TABLE `inbox`
ADD PRIMARY KEY (`I_ID`),
ADD KEY `I_OF` (`I_OF`),
ADD KEY `I_U_ID` (`I_U_ID`);
--
-- Indexes for table `messages`
--
ALTER TABLE `messages`
ADD PRIMARY KEY (`M_ID`),
ADD KEY `M_FROM` (`M_FROM`),
ADD KEY `M_TO` (`M_TO`);
--
-- Indexes for table `products`
--
ALTER TABLE `products`
ADD PRIMARY KEY (`P_ID`),
ADD KEY `P_CATEGORY` (`P_CATEGORY`),
ADD KEY `P_BY_U_ID` (`P_BY_U_ID`),
ADD KEY `P_STATUS` (`P_STATUS`);
--
-- Indexes for table `product_categories`
--
ALTER TABLE `product_categories`
ADD PRIMARY KEY (`PC_ID`);
--
-- Indexes for table `product_exchange_prefs`
--
ALTER TABLE `product_exchange_prefs`
ADD PRIMARY KEY (`PE_ID`),
ADD KEY `PE_P_ID` (`PE_P_ID`),
ADD KEY `PE_PC_ID` (`PE_PC_ID`);
--
-- Indexes for table `product_exchange_status`
--
ALTER TABLE `product_exchange_status`
ADD PRIMARY KEY (`PES_ID`);
--
-- Indexes for table `product_images`
--
ALTER TABLE `product_images`
ADD PRIMARY KEY (`PI_ID`),
ADD KEY `PI_P_ID` (`PI_P_ID`);
--
-- Indexes for table `product_status`
--
ALTER TABLE `product_status`
ADD PRIMARY KEY (`PS_ID`);
--
-- Indexes for table `product_swaps`
--
ALTER TABLE `product_swaps`
ADD PRIMARY KEY (`PS_ID`),
ADD KEY `PS_P_FOR` (`PS_P_FOR`),
ADD KEY `PS_BY` (`PS_BY`),
ADD KEY `PS_STATUS` (`PS_STATUS`);
--
-- Indexes for table `product_swap_offers`
--
ALTER TABLE `product_swap_offers`
ADD PRIMARY KEY (`SO_ID`),
ADD KEY `SO_P_ID` (`SO_P_ID`),
ADD KEY `SO_PS_ID` (`SO_PS_ID`);
--
-- Indexes for table `product_swap_status`
--
ALTER TABLE `product_swap_status`
ADD PRIMARY KEY (`SS_ID`);
--
-- Indexes for table `saved_products`
--
ALTER TABLE `saved_products`
ADD PRIMARY KEY (`S_ID`),
ADD KEY `S_P_ID` (`S_P_ID`),
ADD KEY `S_BY_U_ID` (`S_BY_U_ID`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`U_ID`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `inbox`
--
ALTER TABLE `inbox`
MODIFY `I_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `messages`
--
ALTER TABLE `messages`
MODIFY `M_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=196;
--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
MODIFY `P_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=95;
--
-- AUTO_INCREMENT for table `product_categories`
--
ALTER TABLE `product_categories`
MODIFY `PC_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `product_exchange_prefs`
--
ALTER TABLE `product_exchange_prefs`
MODIFY `PE_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=133;
--
-- AUTO_INCREMENT for table `product_exchange_status`
--
ALTER TABLE `product_exchange_status`
MODIFY `PES_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `product_images`
--
ALTER TABLE `product_images`
MODIFY `PI_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=190;
--
-- AUTO_INCREMENT for table `product_status`
--
ALTER TABLE `product_status`
MODIFY `PS_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `product_swaps`
--
ALTER TABLE `product_swaps`
MODIFY `PS_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `product_swap_offers`
--
ALTER TABLE `product_swap_offers`
MODIFY `SO_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
--
-- AUTO_INCREMENT for table `product_swap_status`
--
ALTER TABLE `product_swap_status`
MODIFY `SS_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `saved_products`
--
ALTER TABLE `saved_products`
MODIFY `S_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=163;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `U_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `inbox`
--
ALTER TABLE `inbox`
ADD CONSTRAINT `inbox_ibfk_1` FOREIGN KEY (`I_OF`) REFERENCES `users` (`U_ID`),
ADD CONSTRAINT `inbox_ibfk_2` FOREIGN KEY (`I_U_ID`) REFERENCES `users` (`U_ID`);
--
-- Constraints for table `messages`
--
ALTER TABLE `messages`
ADD CONSTRAINT `messages_ibfk_1` FOREIGN KEY (`M_FROM`) REFERENCES `users` (`U_ID`),
ADD CONSTRAINT `messages_ibfk_2` FOREIGN KEY (`M_TO`) REFERENCES `users` (`U_ID`);
--
-- Constraints for table `products`
--
ALTER TABLE `products`
ADD CONSTRAINT `products_ibfk_1` FOREIGN KEY (`P_CATEGORY`) REFERENCES `product_categories` (`PC_ID`),
ADD CONSTRAINT `products_ibfk_4` FOREIGN KEY (`P_BY_U_ID`) REFERENCES `users` (`U_ID`),
ADD CONSTRAINT `products_ibfk_5` FOREIGN KEY (`P_STATUS`) REFERENCES `product_status` (`PS_ID`);
--
-- Constraints for table `product_exchange_prefs`
--
ALTER TABLE `product_exchange_prefs`
ADD CONSTRAINT `product_exchange_prefs_ibfk_1` FOREIGN KEY (`PE_P_ID`) REFERENCES `products` (`P_ID`),
ADD CONSTRAINT `product_exchange_prefs_ibfk_2` FOREIGN KEY (`PE_PC_ID`) REFERENCES `product_categories` (`PC_ID`);
--
-- Constraints for table `product_images`
--
ALTER TABLE `product_images`
ADD CONSTRAINT `product_images_ibfk_1` FOREIGN KEY (`PI_P_ID`) REFERENCES `products` (`P_ID`);
--
-- Constraints for table `product_swaps`
--
ALTER TABLE `product_swaps`
ADD CONSTRAINT `product_swaps_ibfk_1` FOREIGN KEY (`PS_P_FOR`) REFERENCES `products` (`P_ID`),
ADD CONSTRAINT `product_swaps_ibfk_2` FOREIGN KEY (`PS_BY`) REFERENCES `users` (`U_ID`),
ADD CONSTRAINT `product_swaps_ibfk_3` FOREIGN KEY (`PS_STATUS`) REFERENCES `product_swap_status` (`SS_ID`);
--
-- Constraints for table `product_swap_offers`
--
ALTER TABLE `product_swap_offers`
ADD CONSTRAINT `product_swap_offers_ibfk_1` FOREIGN KEY (`SO_P_ID`) REFERENCES `products` (`P_ID`),
ADD CONSTRAINT `product_swap_offers_ibfk_2` FOREIGN KEY (`SO_PS_ID`) REFERENCES `product_swaps` (`PS_ID`);
--
-- Constraints for table `saved_products`
--
ALTER TABLE `saved_products`
ADD CONSTRAINT `saved_products_ibfk_1` FOREIGN KEY (`S_P_ID`) REFERENCES `products` (`P_ID`),
ADD CONSTRAINT `saved_products_ibfk_2` FOREIGN KEY (`S_BY_U_ID`) REFERENCES `users` (`U_ID`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;