Skip to content

Commit 89fab2b

Browse files
committed
Committed all changes
0 parents  commit 89fab2b

File tree

93 files changed

+24313
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+24313
-0
lines changed
Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
-- phpMyAdmin SQL Dump
2+
-- version 5.2.1
3+
-- https://www.phpmyadmin.net/
4+
--
5+
-- Host: localhost
6+
-- Generation Time: Jun 09, 2023 at 02:08 AM
7+
-- Server version: 8.0.28
8+
-- PHP Version: 8.1.4
9+
10+
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11+
START TRANSACTION;
12+
SET time_zone = "+00:00";
13+
14+
15+
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
16+
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
17+
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
18+
/*!40101 SET NAMES utf8mb4 */;
19+
20+
--
21+
-- Database: `shop`
22+
--
23+
24+
-- --------------------------------------------------------
25+
26+
--
27+
-- Table structure for table `categories`
28+
--
29+
30+
CREATE TABLE `categories` (
31+
`ID` int NOT NULL,
32+
`Name` varchar(255) NOT NULL,
33+
`Description` text NOT NULL,
34+
`parent` int NOT NULL,
35+
`Ordering` int DEFAULT NULL,
36+
`Visibility` tinyint NOT NULL DEFAULT '0',
37+
`Allow_Comment` tinyint NOT NULL DEFAULT '0',
38+
`Allow_Ads` tinyint NOT NULL DEFAULT '0'
39+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
40+
41+
--
42+
-- Dumping data for table `categories`
43+
--
44+
45+
INSERT INTO `categories` (`ID`, `Name`, `Description`, `parent`, `Ordering`, `Visibility`, `Allow_Comment`, `Allow_Ads`) VALUES
46+
(17, 'Hand Made', 'Hand Made Items', 0, 1, 1, 1, 1),
47+
(18, 'Computers', 'Computer Items', 0, 2, 0, 0, 0),
48+
(19, 'Cell Phones', 'Cell Phones', 0, 3, 0, 0, 0),
49+
(20, 'Clothing', 'Clothes and Fashion', 0, 4, 0, 0, 0),
50+
(21, 'Tools', 'Home Tools', 0, 5, 0, 0, 0),
51+
(23, 'Blackberry', 'Blackberry Phones', 19, 2, 0, 0, 0),
52+
(24, 'Hammers', 'Hammers Description test', 21, 1, 0, 0, 0),
53+
(25, 'Boxes', 'Boxes Hand made', 21, 1, 0, 0, 0),
54+
(26, 'Wool', 'Hand Made wool', 17, 3, 0, 0, 0),
55+
(27, 'Games', '', 0, 1, 0, 0, 0),
56+
(28, 'Cars', 'Luxurious cars', 0, 6, 0, 0, 0);
57+
58+
-- --------------------------------------------------------
59+
60+
--
61+
-- Table structure for table `comments`
62+
--
63+
64+
CREATE TABLE `comments` (
65+
`c_id` int NOT NULL,
66+
`comment` text NOT NULL,
67+
`status` tinyint NOT NULL,
68+
`comment_date` date NOT NULL,
69+
`item_id` int NOT NULL,
70+
`user_id` int NOT NULL
71+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
72+
73+
--
74+
-- Dumping data for table `comments`
75+
--
76+
77+
INSERT INTO `comments` (`c_id`, `comment`, `status`, `comment_date`, `item_id`, `user_id`) VALUES
78+
(10, 'Awesome!\r\n', 0, '2023-05-23', 16, 29),
79+
(11, 'Cool!\r\n', 1, '2023-05-23', 23, 29),
80+
(12, 'Comfortable!\r\n', 0, '2023-05-23', 22, 29),
81+
(13, 'test comment\r\n', 0, '2023-06-09', 17, 29);
82+
83+
-- --------------------------------------------------------
84+
85+
--
86+
-- Table structure for table `items`
87+
--
88+
89+
CREATE TABLE `items` (
90+
`Item_ID` int NOT NULL,
91+
`Name` varchar(255) NOT NULL,
92+
`Description` text NOT NULL,
93+
`Price` varchar(255) NOT NULL,
94+
`Add_Date` date NOT NULL,
95+
`Country_Made` varchar(255) NOT NULL,
96+
`Image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
97+
`Status` varchar(255) NOT NULL,
98+
`Rating` smallint DEFAULT NULL,
99+
`Approve` tinyint NOT NULL DEFAULT '0',
100+
`Cat_ID` int NOT NULL,
101+
`Member_ID` int NOT NULL,
102+
`tags` varchar(255) NOT NULL
103+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
104+
105+
--
106+
-- Dumping data for table `items`
107+
--
108+
109+
INSERT INTO `items` (`Item_ID`, `Name`, `Description`, `Price`, `Add_Date`, `Country_Made`, `Image`, `Status`, `Rating`, `Approve`, `Cat_ID`, `Member_ID`, `tags`) VALUES
110+
(12, 'Network Cable', 'Cat 9 Network Cable', '$100', '2018-03-10', 'USA', '', '1', 0, 1, 18, 14, ''),
111+
(14, 'Assassin\'s Creed', 'Open-world, action-adventure, and stealth game', '150', '2018-03-26', 'Turkey', '', '4', 0, 1, 27, 21, ''),
112+
(16, 'Wooden Game', 'A good wooden game', '100', '2018-03-29', 'Egypt', '', '1', 0, 0, 17, 21, 'Hand, Discount, Guarantee'),
113+
(17, 'Diablo |||', 'Good playstation 4 Game', '70', '2018-03-30', 'USA', '', '1', 0, 1, 18, 21, 'RPG, Online, Game'),
114+
(18, 'Ys: The Oath in Felghan', 'A good PS Game', '100', '2018-03-30', 'Japan', '', '1', 0, 0, 27, 21, 'Online, RPG, Gamed'),
115+
(21, 'Lamborghini', 'Lambo cars', '3157145', '2023-04-14', 'Italy', NULL, '1', NULL, 1, 28, 21, 'cars'),
116+
(22, 'Men's Sneakers', 'High quality sneakers', '450', '2023-05-20', 'Egypt', NULL, '1', NULL, 0, 20, 29, ''),
117+
(23, 'iPhone 14', 'Luxurious Apple iPhone 14', '41999', '2023-05-20', 'China', NULL, '1', NULL, 1, 18, 29, '');
118+
119+
-- --------------------------------------------------------
120+
121+
--
122+
-- Table structure for table `users`
123+
--
124+
125+
CREATE TABLE `users` (
126+
`UserID` int NOT NULL COMMENT 'To identify user',
127+
`Username` varchar(255) NOT NULL COMMENT 'Username to login',
128+
`Password` varchar(255) NOT NULL COMMENT 'Password to login',
129+
`Email` varchar(255) NOT NULL,
130+
`FullName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
131+
`GroupID` int NOT NULL DEFAULT '0' COMMENT 'Identifies Group ID (Admin or Normal User or Moderator)',
132+
`TrustStatus` int NOT NULL DEFAULT '0' COMMENT 'Seller Rank',
133+
`RegStatus` int NOT NULL DEFAULT '0' COMMENT 'User approval status (Ex: pending, approved, ...)',
134+
`Date` date NOT NULL,
135+
`avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL
136+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
137+
138+
--
139+
-- Dumping data for table `users`
140+
--
141+
142+
INSERT INTO `users` (`UserID`, `Username`, `Password`, `Email`, `FullName`, `GroupID`, `TrustStatus`, `RegStatus`, `Date`, `avatar`) VALUES
143+
(12, 'Hind', '601f1889667efaebb33b8c12572835da3f027f78', '[email protected]', 'Hind Ahmed', 0, 0, 1, '2018-02-25', '875944_hind.jpg'),
144+
(14, 'Fathy', '03785d4e638cd09cea620fd0939bf06825be88df', '[email protected]', 'Fathy Shady', 0, 0, 0, '2018-02-25', ''),
145+
(16, 'Ramy', '59f7c8818803a2f0d7946e160dc2a63b88c0ee28', '[email protected]', 'Ramy Rabie', 0, 0, 1, '2018-02-25', '997912_ramy.jpg'),
146+
(17, 'Adel', 'e5594062f0a0a362abbb022a6fb0c36dcd9a1bd1', '[email protected]', 'Adel Sameh', 0, 0, 0, '2018-02-25', '475952_adel.jpg'),
147+
(21, 'Mazen', '601f1889667efaebb33b8c12572835da3f027f78', '[email protected]', 'Mazen Naeem', 0, 0, 1, '2018-03-02', ''),
148+
(22, 'Fayez', '601f1889667efaebb33b8c12572835da3f027f78', '[email protected]', 'Fayez Fawzy', 0, 0, 0, '2018-03-13', '525975_fayez.jpg'),
149+
(27, 'Abu Gamal', '601f1889667efaebb33b8c12572835da3f027f78', '[email protected]', 'Abu Gamal Mahmoud Shanawany', 0, 0, 1, '2018-03-31', ''),
150+
(29, 'Ahmed', '7c4a8d09ca3762af61e59520943dc26494f8941b', '[email protected]', 'Ahmed Yahya', 1, 0, 1, '2023-05-20', NULL);
151+
152+
--
153+
-- Indexes for dumped tables
154+
--
155+
156+
--
157+
-- Indexes for table `categories`
158+
--
159+
ALTER TABLE `categories`
160+
ADD PRIMARY KEY (`ID`),
161+
ADD UNIQUE KEY `Name` (`Name`);
162+
163+
--
164+
-- Indexes for table `comments`
165+
--
166+
ALTER TABLE `comments`
167+
ADD PRIMARY KEY (`c_id`),
168+
ADD KEY `My_items_comments` (`item_id`),
169+
ADD KEY `My_users_comment` (`user_id`);
170+
171+
--
172+
-- Indexes for table `items`
173+
--
174+
ALTER TABLE `items`
175+
ADD PRIMARY KEY (`Item_ID`),
176+
ADD KEY `hamada` (`Member_ID`),
177+
ADD KEY `hazem` (`Cat_ID`);
178+
179+
--
180+
-- Indexes for table `users`
181+
--
182+
ALTER TABLE `users`
183+
ADD PRIMARY KEY (`UserID`),
184+
ADD UNIQUE KEY `Username` (`Username`);
185+
186+
--
187+
-- AUTO_INCREMENT for dumped tables
188+
--
189+
190+
--
191+
-- AUTO_INCREMENT for table `categories`
192+
--
193+
ALTER TABLE `categories`
194+
MODIFY `ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;
195+
196+
--
197+
-- AUTO_INCREMENT for table `comments`
198+
--
199+
ALTER TABLE `comments`
200+
MODIFY `c_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
201+
202+
--
203+
-- AUTO_INCREMENT for table `items`
204+
--
205+
ALTER TABLE `items`
206+
MODIFY `Item_ID` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
207+
208+
--
209+
-- AUTO_INCREMENT for table `users`
210+
--
211+
ALTER TABLE `users`
212+
MODIFY `UserID` int NOT NULL AUTO_INCREMENT COMMENT 'To identify user', AUTO_INCREMENT=30;
213+
214+
--
215+
-- Constraints for dumped tables
216+
--
217+
218+
--
219+
-- Constraints for table `comments`
220+
--
221+
ALTER TABLE `comments`
222+
ADD CONSTRAINT `My_items_comments` FOREIGN KEY (`item_id`) REFERENCES `items` (`Item_ID`) ON DELETE CASCADE ON UPDATE CASCADE,
223+
ADD CONSTRAINT `My_users_comment` FOREIGN KEY (`user_id`) REFERENCES `users` (`UserID`) ON DELETE CASCADE ON UPDATE CASCADE;
224+
225+
--
226+
-- Constraints for table `items`
227+
--
228+
ALTER TABLE `items`
229+
ADD CONSTRAINT `hamada` FOREIGN KEY (`Member_ID`) REFERENCES `users` (`UserID`) ON DELETE CASCADE ON UPDATE CASCADE,
230+
ADD CONSTRAINT `hazem` FOREIGN KEY (`Cat_ID`) REFERENCES `categories` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE;
231+
COMMIT;
232+
233+
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
234+
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
235+
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

0 commit comments

Comments
 (0)