-
Notifications
You must be signed in to change notification settings - Fork 1
/
project.sql
356 lines (291 loc) · 11.9 KB
/
project.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
-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 15, 2022 at 10:08 AM
-- 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: `project`
--
-- --------------------------------------------------------
--
-- Table structure for table `admins`
--
CREATE TABLE `admins` (
`aid` int(11) NOT NULL,
`name` varchar(30) NOT NULL,
`email` varchar(50) NOT NULL,
`password` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `admins`
--
INSERT INTO `admins` (`aid`, `name`, `email`, `password`) VALUES
(1, 'admin', '[email protected]', '12345');
-- --------------------------------------------------------
--
-- Table structure for table `mycart`
--
CREATE TABLE `mycart` (
`cartid` int(11) NOT NULL,
`userid` int(11) NOT NULL,
`pid` int(11) NOT NULL,
`cartqty` int(11) NOT NULL DEFAULT 1,
`carttitle` varchar(30) NOT NULL,
`cartdesc` varchar(100) NOT NULL,
`cartprice` int(10) NOT NULL,
`cartimg` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `mycart`
--
INSERT INTO `mycart` (`cartid`, `userid`, `pid`, `cartqty`, `carttitle`, `cartdesc`, `cartprice`, `cartimg`) VALUES
(9, 43, 17, 1, 'boAt Rockerz 450 Bluetooth On ', 'Active Noise Cancellation, Bluetooth Wireless Over Ear Headphones with Mic with 40Mm Drivers, Upto 2', 5000, 'admin/product-photos/h-2.jpg'),
(13, 43, 1, 3, 'EvoFox Game Box TV Gaming Cons', 'Smart Remote and Game Controller | 4GB RAM, 32 GB Storage | Dedicated GPU, Quad Core Processor | Dua', 8000, 'admin/product-photos/g-2.jpg'),
(57, 55, 18, 1, '2021 Apple MacBook Pro ', '16-inch 41.05 cm, Apple M1 Max chip with 10‑core CPU and 32‑core GPU, 32GB RAM, 1TB SSD - Space Grey', 90000, 'admin/product-photos/l-2.jpg'),
(78, 44, 6, 1, 'MEETION Gaming Mouse', 'Black Wired Gaming Mouse with LED Backlit, 5+1 Buttons, Optical A704\r\n ', 2500, 'admin/product-photos/g-1.jpg');
-- --------------------------------------------------------
--
-- Table structure for table `orders`
--
CREATE TABLE `orders` (
`oid` int(11) NOT NULL,
`ogrp_id` int(11) NOT NULL,
`uid` int(11) NOT NULL,
`adrid` int(11) NOT NULL,
`pid` int(11) NOT NULL,
`qty` int(11) NOT NULL DEFAULT 1,
`date` date NOT NULL DEFAULT current_timestamp(),
`status` int(11) NOT NULL DEFAULT 0 COMMENT '0 = pending\r\n1 = delivered'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `orders`
--
INSERT INTO `orders` (`oid`, `ogrp_id`, `uid`, `adrid`, `pid`, `qty`, `date`, `status`) VALUES
(40, 7424, 44, 39, 24, 2, '2022-11-09', 0),
(41, 7424, 44, 39, 19, 1, '2022-11-09', 1),
(42, 7619, 57, 40, 19, 1, '2022-11-09', 0),
(43, 7723, 57, 41, 23, 1, '2022-11-09', 1),
(44, 7920, 57, 42, 20, 2, '2022-11-15', 0);
-- --------------------------------------------------------
--
-- Table structure for table `product-catagory`
--
CREATE TABLE `product-catagory` (
`cid` int(11) NOT NULL,
`cname` varchar(30) NOT NULL,
`slug` varchar(30) NOT NULL,
`status` int(11) NOT NULL DEFAULT 0 COMMENT '0= enable,1= Disable',
`issubset` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `product-catagory`
--
INSERT INTO `product-catagory` (`cid`, `cname`, `slug`, `status`, `issubset`) VALUES
(1, 'mobile', 'mobiles', 0, 0),
(2, 'laptop', 'laptops', 0, 0),
(3, 'watch', 'smart watches', 0, 0),
(4, 'audio', 'Audio items', 0, 1),
(13, 'gaming', 'gaming products', 0, 1);
-- --------------------------------------------------------
--
-- Table structure for table `products`
--
CREATE TABLE `products` (
`pid` int(11) NOT NULL,
`pname` varchar(30) NOT NULL,
`cid` int(11) NOT NULL,
`subid` int(11) NOT NULL DEFAULT 0,
`price` int(8) NOT NULL,
`dis-price` int(8) NOT NULL,
`desc` varchar(255) NOT NULL,
`pimg` varchar(100) NOT NULL,
`status` int(11) NOT NULL DEFAULT 0 COMMENT '0= enable,1= Disable'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `products`
--
INSERT INTO `products` (`pid`, `pname`, `cid`, `subid`, `price`, `dis-price`, `desc`, `pimg`, `status`) VALUES
(1, 'EvoFox Game Box TV Gaming Cons', 13, 31, 10000, 8000, 'Smart Remote and Game Controller | 4GB RAM, 32 GB Storage | Dedicated GPU, Quad Core Processor | Dual-Band WiFi | Fox OS | 4k HDMI Output | Bluetooth 5.0 (Coal Black)', 'admin/product-photos/g-2.jpg', 1),
(6, 'MEETION Gaming Mouse', 13, 30, 3000, 2500, 'Black Wired Gaming Mouse with LED Backlit, 5+1 Buttons, Optical A704\r\n Sensor, 800 to 2400 DPI, Soft Touch Switch, Ergonomic Symmetric Design for ', 'admin/product-photos/g-1.jpg', 0),
(13, 'Amazfit Smart Watch', 3, 0, 4000, 2000, 'Always-on AMOLED Display, Alexa Built-in, SpO2, 14 Days Battery Life, 68 Sports Modes, GPS, HR, Sleep & Stress Monitoring (Breeze Blue)', 'admin/product-photos/w-1.jpeg', 1),
(14, 'Fire-Boltt Ninja 3 Smartwatch', 3, 0, 3000, 2000, 'Full Touch 1.69 & 60 Sports Modes with IP68, Sp02 Tracking, Over 100 Cloud based watch faces', 'admin/product-photos/w-2.jpg', 0),
(15, 'Apple Watch SE ', 3, 25, 10000, 8000, 'Space Grey Aluminium Case with Midnight Sport Band - Regular', 'admin/product-photos/w-3.jpg', 0),
(16, 'boAt Rockerz 450 Bluetooth On ', 4, 1, 8000, 5000, ' Mic, Upto 15 Hours Playback, 40MM Drivers, Padded Ear Cushions, Integrated Controls and Dual Headphones...', 'admin/product-photos/h-1.jpg', 0),
(17, 'boAt Rockerz 450 Bluetooth On ', 4, 1, 7000, 5000, 'Active Noise Cancellation, Bluetooth Wireless Over Ear Headphones with Mic with 40Mm Drivers, Upto 20 Hours Playtime, Deep Bass &...', 'admin/product-photos/h-2.jpg', 1),
(18, '2021 Apple MacBook Pro ', 2, 0, 100000, 90000, '16-inch 41.05 cm, Apple M1 Max chip with 10‑core CPU and 32‑core GPU, 32GB RAM, 1TB SSD - Space Grey', 'admin/product-photos/l-2.jpg', 0),
(19, 'OnePlus Nord CE 2 Lite 5G', 1, 0, 20000, 19000, 'Black Dusk, 6GB RAM, 128GB Storage\r\nmobile', 'admin/product-photos/m-1.jpg', 0),
(20, 'Apple iPhone 12 Mini (64GB) - ', 1, 0, 60000, 57000, 'Apple iPhone 12 Mini (64GB) Red mobile', 'admin/product-photos/m-2.jpeg', 0),
(21, 'Samsung Galaxy S20 FE 5G', 1, 0, 40000, 36000, 'Cloud Lavender, 8GB RAM, 128GB Storage mobile', 'admin/product-photos/m-3.jpg', 0),
(22, 'Xbox Series X', 5, 28, 70000, 56000, 'Introducing Xbox Series X, the fastest, most powerful Xbox ever. Play thousands of titles from four generations of consoles-all games look and play best on Xbox Series X.', 'admin/product-photos/g-3.jpg', 0),
(23, 'Dell Inspiron 3525 Laptop', 2, 0, 60000, 54000, ' AMD Athlon Silver 3050U, Win 11 + MSO 21, 8GB GDDR4, 256Gb SSD, Radeon Graphics, \r\nlaptop 15.6 (39.62Cms) HD Anti-Glare (D560766Win9Be, 1.68Kgs)', 'admin/product-photos/l-3.jpg', 0),
(24, 'Acer Nitro 5 Intel Core i5-9th', 2, 0, 60000, 54000, '15.6 (39.62cms) Display 1920 x 1080 Thin and Light Gaming Laptop (8GB Ram/1TB HDD/Windows 10 Home/GTX 1650 Graphics/Obsidian Black/2.3 Kgs), AN515-54', 'admin/product-photos/l-1.jpeg', 0);
-- --------------------------------------------------------
--
-- Table structure for table `sub-catagory`
--
CREATE TABLE `sub-catagory` (
`subid` int(11) NOT NULL,
`subname` varchar(30) NOT NULL,
`cid` int(11) NOT NULL,
`status` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `sub-catagory`
--
INSERT INTO `sub-catagory` (`subid`, `subname`, `cid`, `status`) VALUES
(1, 'HeadPhone', 4, 0),
(30, 'mouse', 13, 0),
(31, 'controler', 13, 0),
(32, 'consoles', 13, 1);
-- --------------------------------------------------------
--
-- Table structure for table `user-address`
--
CREATE TABLE `user-address` (
`adrid` int(11) NOT NULL,
`uid` int(11) NOT NULL,
`number` varchar(50) NOT NULL,
`name` varchar(30) NOT NULL,
`address` varchar(200) NOT NULL,
`city` varchar(30) NOT NULL,
`state` varchar(30) NOT NULL,
`zip` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `user-address`
--
INSERT INTO `user-address` (`adrid`, `uid`, `number`, `name`, `address`, `city`, `state`, `zip`) VALUES
(39, 44, '3435464656', 'test', 'sdsfdsf', 'dfsf', 'fsfd', 43434),
(40, 57, '3435454656', 'makima', 'sdsdada', 'surat', 'gujrat', 0),
(41, 57, '3434543535', 'makima', 'fdsf', 'fdf', 'dsf', 3232232),
(42, 57, '9824489823', 'makima', '478, Nai Sadak\r\nChandni chowk', 'Surat', 'Gujrat', 395009);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`name` varchar(20) NOT NULL,
`password` varchar(255) NOT NULL,
`email` varchar(50) NOT NULL,
`status` int(2) NOT NULL DEFAULT 0 COMMENT '0= enable,1= Disable'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `name`, `password`, `email`, `status`) VALUES
(44, 'test', '$2y$10$Eja4miWmAXJSvLEq6ZmDv.HBOnMhKSJODl1ny6FMsphNtjlAySjO6', 'test@test', 0),
(49, 'test1', '$2y$10$18cTvpK8OM.H63zIqvGvh.rxRPj/RJ7rgnddJfI4l63jXH62sI60W', 'test@test1', 0),
(53, 'jainex', '$2y$10$PcgJcnHEsZklrtS41LUdXeTVoa/fei6bMNHjk5YYKsi3FEZP7JqIm', '[email protected]', 0),
(56, 'luffy', '$2y$10$ARb0uU5So.eIgIgTt0d7ce0UITGcd2ibEA3HIo.LCaxSkEe4qegEC', '[email protected]', 0),
(57, 'makima', '$2y$10$Cq4YdLOVcuPby5.GA1AkTuhQsXOlqFnw25SpwDHfp.8hBP2Dr8zzq', '[email protected]', 0);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admins`
--
ALTER TABLE `admins`
ADD PRIMARY KEY (`aid`),
ADD UNIQUE KEY `email` (`email`);
--
-- Indexes for table `mycart`
--
ALTER TABLE `mycart`
ADD PRIMARY KEY (`cartid`);
--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
ADD PRIMARY KEY (`oid`),
ADD KEY `uid` (`uid`);
--
-- Indexes for table `product-catagory`
--
ALTER TABLE `product-catagory`
ADD PRIMARY KEY (`cid`);
--
-- Indexes for table `products`
--
ALTER TABLE `products`
ADD PRIMARY KEY (`pid`);
--
-- Indexes for table `sub-catagory`
--
ALTER TABLE `sub-catagory`
ADD PRIMARY KEY (`subid`);
--
-- Indexes for table `user-address`
--
ALTER TABLE `user-address`
ADD PRIMARY KEY (`adrid`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `admins`
--
ALTER TABLE `admins`
MODIFY `aid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `mycart`
--
ALTER TABLE `mycart`
MODIFY `cartid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=80;
--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
MODIFY `oid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;
--
-- AUTO_INCREMENT for table `product-catagory`
--
ALTER TABLE `product-catagory`
MODIFY `cid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
MODIFY `pid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;
--
-- AUTO_INCREMENT for table `sub-catagory`
--
ALTER TABLE `sub-catagory`
MODIFY `subid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;
--
-- AUTO_INCREMENT for table `user-address`
--
ALTER TABLE `user-address`
MODIFY `adrid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=43;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=58;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `orders`
--
ALTER TABLE `orders`
ADD CONSTRAINT `orders_ibfk_1` FOREIGN KEY (`uid`) REFERENCES `users` (`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 */;