hockey_cms.sql 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. /*M!999999\- enable the sandbox mode */
  2. -- MariaDB dump 10.19-11.8.6-MariaDB, for debian-linux-gnu (aarch64)
  3. --
  4. -- Host: localhost Database: hockey_cms
  5. -- ------------------------------------------------------
  6. -- Server version 11.8.6-MariaDB-0+deb13u1 from Debian
  7. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  8. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  9. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  10. /*!40101 SET NAMES utf8mb4 */;
  11. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  12. /*!40103 SET TIME_ZONE='+00:00' */;
  13. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  14. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  15. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  16. /*M!100616 SET @OLD_NOTE_VERBOSITY=@@NOTE_VERBOSITY, NOTE_VERBOSITY=0 */;
  17. --
  18. -- Table structure for table `attribute_groups`
  19. --
  20. DROP TABLE IF EXISTS `attribute_groups`;
  21. /*!40101 SET @saved_cs_client = @@character_set_client */;
  22. /*!40101 SET character_set_client = utf8mb4 */;
  23. CREATE TABLE `attribute_groups` (
  24. `id` int(11) NOT NULL AUTO_INCREMENT,
  25. `name` varchar(100) NOT NULL,
  26. `name_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  27. PRIMARY KEY (`id`)
  28. ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  29. /*!40101 SET character_set_client = @saved_cs_client */;
  30. --
  31. -- Dumping data for table `attribute_groups`
  32. --
  33. SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
  34. LOCK TABLES `attribute_groups` WRITE;
  35. /*!40000 ALTER TABLE `attribute_groups` DISABLE KEYS */;
  36. INSERT INTO `attribute_groups` VALUES
  37. (1,'ICE SKATES','ΠΑΓΟΠΕΔΙΛΑ'),
  38. (2,'ΡΟΥΧΙΣΜΟΣ','APPAREL'),
  39. (10,'ΜΠΑΣΤΟΥΝΙΑ','STICKS');
  40. /*!40000 ALTER TABLE `attribute_groups` ENABLE KEYS */;
  41. UNLOCK TABLES;
  42. COMMIT;
  43. SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
  44. --
  45. -- Table structure for table `attributes`
  46. --
  47. DROP TABLE IF EXISTS `attributes`;
  48. /*!40101 SET @saved_cs_client = @@character_set_client */;
  49. /*!40101 SET character_set_client = utf8mb4 */;
  50. CREATE TABLE `attributes` (
  51. `id` int(11) NOT NULL AUTO_INCREMENT,
  52. `group_id` int(11) NOT NULL,
  53. `name` varchar(100) NOT NULL,
  54. `name_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  55. `unit` varchar(50) DEFAULT NULL,
  56. PRIMARY KEY (`id`),
  57. KEY `group_id` (`group_id`),
  58. CONSTRAINT `attributes_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `attribute_groups` (`id`) ON DELETE CASCADE
  59. ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  60. /*!40101 SET character_set_client = @saved_cs_client */;
  61. --
  62. -- Dumping data for table `attributes`
  63. --
  64. SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
  65. LOCK TABLES `attributes` WRITE;
  66. /*!40000 ALTER TABLE `attributes` DISABLE KEYS */;
  67. INSERT INTO `attributes` VALUES
  68. (1,1,'ΜΕΓΕΘΟΣ','SIZE','US'),
  69. (3,1,'ΜΕΓΕΘΟΣ','SIZE','EU'),
  70. (4,1,'ΚΑΤΑΣΤΑΣΗ','CONDITION',''),
  71. (6,2,'ΜΕΓΕΘΟΣ','SIZE',''),
  72. (7,2,'ΗΛΙΚΙΑ','AGE','YO'),
  73. (8,2,'ΚΑΤΑΣΤΑΣΗ','CONDITION',''),
  74. (12,10,'ΚΑΤΑΣΤΑΣΗ','CONDITION',''),
  75. (13,10,'ΥΨΟΣ','HEIGHT','CM'),
  76. (14,10,'ΧΕΡΙ','HAND','Left/Right');
  77. /*!40000 ALTER TABLE `attributes` ENABLE KEYS */;
  78. UNLOCK TABLES;
  79. COMMIT;
  80. SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
  81. --
  82. -- Table structure for table `categories`
  83. --
  84. DROP TABLE IF EXISTS `categories`;
  85. /*!40101 SET @saved_cs_client = @@character_set_client */;
  86. /*!40101 SET character_set_client = utf8mb4 */;
  87. CREATE TABLE `categories` (
  88. `id` int(11) NOT NULL AUTO_INCREMENT,
  89. `parent_id` int(11) DEFAULT NULL,
  90. `name_el` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  91. `name_en` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  92. `sort_order` int(11) NOT NULL DEFAULT 0,
  93. `slug` varchar(100) NOT NULL,
  94. `attribute_group_id` int(11) DEFAULT NULL,
  95. PRIMARY KEY (`id`),
  96. UNIQUE KEY `slug` (`slug`),
  97. KEY `parent_id` (`parent_id`),
  98. KEY `attribute_group_id` (`attribute_group_id`),
  99. CONSTRAINT `categories_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `categories` (`id`) ON DELETE SET NULL,
  100. CONSTRAINT `categories_ibfk_2` FOREIGN KEY (`attribute_group_id`) REFERENCES `attribute_groups` (`id`) ON DELETE SET NULL,
  101. CONSTRAINT `categories_ibfk_3` FOREIGN KEY (`attribute_group_id`) REFERENCES `attribute_groups` (`id`) ON DELETE SET NULL
  102. ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  103. /*!40101 SET character_set_client = @saved_cs_client */;
  104. --
  105. -- Dumping data for table `categories`
  106. --
  107. SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
  108. LOCK TABLES `categories` WRITE;
  109. /*!40000 ALTER TABLE `categories` DISABLE KEYS */;
  110. INSERT INTO `categories` VALUES
  111. (1,NULL,'ΠΑΓΟΠΕΔΙΛΑ','ICE SKATES',1,'ice-skates',1),
  112. (9,NULL,'ΕΞΟΠΛΗΣΜΟΣ ΤΕΡΜΑΤΟΦΥΛΑΚΑ','GOALIE GEAR',12,'goalie-gear',2),
  113. (10,NULL,'ΜΠΑΣΤΟΥΝΙΑ','STICKS',2,'sticks',10),
  114. (13,NULL,'ΡΟΥΧΙΣΜΟΣ','APPAREL',3,'apparel',2),
  115. (15,16,'ΓΑΝΤΙΑ','GLOVES',5,'gloves',2),
  116. (16,NULL,'ΠΡΟΣΤΑΣΙΑ','PROTECTIVE GEAR',4,'protective-gear',2),
  117. (17,16,'ΕΠΙΑΓΚΩΝΙΔΕΣ','PADS ELBOW',6,'pads-elbow',2),
  118. (18,16,'ΕΠΙΚΑΛΑΜΙΔΕΣ','SHIN GUARDS',7,'shin-guards',2),
  119. (19,13,'ΘΩΡΑΚΕΣ & ΕΠΩΜΙΔΕΣ','CHEST & SOULDER PADS',9,'chest-soulder-pads',2),
  120. (20,16,'ΚΡΑΝΟΣ','HELMET',8,'helmet',2),
  121. (21,13,'ΠΑΝΤΕΛΟΝΙ','PANTS',10,'pants',2),
  122. (22,13,'ΣΠΑΣΟΥΑΡ','JOCK',11,'jock',2);
  123. /*!40000 ALTER TABLE `categories` ENABLE KEYS */;
  124. UNLOCK TABLES;
  125. COMMIT;
  126. SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
  127. --
  128. -- Table structure for table `email_templates`
  129. --
  130. DROP TABLE IF EXISTS `email_templates`;
  131. /*!40101 SET @saved_cs_client = @@character_set_client */;
  132. /*!40101 SET character_set_client = utf8mb4 */;
  133. CREATE TABLE `email_templates` (
  134. `id` int(11) NOT NULL AUTO_INCREMENT,
  135. `template_key` varchar(50) NOT NULL,
  136. `name` varchar(100) NOT NULL,
  137. `subject_el` varchar(255) NOT NULL,
  138. `subject_en` varchar(255) NOT NULL,
  139. `body_el` text NOT NULL,
  140. `body_en` text NOT NULL,
  141. PRIMARY KEY (`id`),
  142. UNIQUE KEY `template_key` (`template_key`)
  143. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  144. /*!40101 SET character_set_client = @saved_cs_client */;
  145. --
  146. -- Dumping data for table `email_templates`
  147. --
  148. SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
  149. LOCK TABLES `email_templates` WRITE;
  150. /*!40000 ALTER TABLE `email_templates` DISABLE KEYS */;
  151. INSERT INTO `email_templates` VALUES
  152. (1,'new_order',' ( / )','HockeyGear - Επιβεβαίωση καταχώρισης παραγγελίας #{order_id}','HockeyGear - Order Confirmation #{order_id}','Αγαπητέ/ή {customer_name},\r\n\r\nΚαταχωρίθηκε επιτυχώς η παραγγελία σας με τα παρακάτω στοιχεία:\r\n\r\nΚωδικός Παραγγελίας: #{order_id}\r\n\r\nΣυνολική Τιμή: {total_amount}\r\n\r\nΠαρακαλούμε όπως επικοινωνήσετε με τον πωλητή για τη διαδικασία παραλαβής.','Dear {customer_name},\r\n\r\nYour order has been successfully placed with the following details:\r\n\r\nOrder ID: #{order_id}\r\n\r\nTotal Amount: {total_amount}\r\n\r\nPlease contact the seller to arrange your order collection/pickup.'),
  153. (2,'status_change',' ','HockeyGear - Ενημέρωση κατάστασης παραγγελίας #{order_id}','HockeyGear - Order Status Update #{order_id}','Αγαπητέ/ή {customer_name},\r\n\r\nΣας ενημερώνουμε ότι η κατάσταση της παραγγελίας σας άλλαξε.\r\n\r\nΚωδικός Παραγγελίας: #{order_id}\r\n\r\nΝέα Κατάσταση: {status}\r\n\r\nΠαρακαλούμε επικοινωνήστε μαζί μας ή με τον πωλητή για περισσότερες πληροφορίες.','Dear {customer_name},\r\n\r\nWe would like to inform you that the status of your order has been updated.\r\n\r\nOrder ID: #{order_id}\r\n\r\nNew Status: {status}\r\n\r\nPlease contact us or the seller for further details.'),
  154. (3,'seller_new_order',' ( )','HockeyGear - Νέα Παραγγελία #{order_id} - Πάνελ Διαχείρισης','New Sale! Order #{order_id} - Hockey CMS','Αγαπητέ συνεργάτη,\r\n\r\nΚαταχωρίθηκε νέα παραγγελία στο σύστημα με τα παρακάτω στοιχεία:\r\n\r\nΚωδικός Παραγγελίας: #{order_id}\r\n\r\nΠελάτης: {customer_name}\r\n\r\nΣυνολική Τιμή: {total_amount}\r\n\r\nΠαρακαλούμε συνδεθείτε στο πάνελ διαχείρισης για να δείτε τις λεπτομέρειες και να προχωρήσετε στις απαραίτητες ενέργειες.','Dear Partner,\r\n\r\nA new order has been placed in the system with the following details:\r\n\r\nOrder ID: #{order_id}\r\n\r\nCustomer: {customer_name}\r\n\r\nTotal Amount: {total_amount}\r\n\r\nPlease log in to your admin panel to view the details and proceed with the order fulfillment.');
  155. /*!40000 ALTER TABLE `email_templates` ENABLE KEYS */;
  156. UNLOCK TABLES;
  157. COMMIT;
  158. SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
  159. --
  160. -- Table structure for table `order_items`
  161. --
  162. DROP TABLE IF EXISTS `order_items`;
  163. /*!40101 SET @saved_cs_client = @@character_set_client */;
  164. /*!40101 SET character_set_client = utf8mb4 */;
  165. CREATE TABLE `order_items` (
  166. `id` int(11) NOT NULL AUTO_INCREMENT,
  167. `order_id` int(11) NOT NULL,
  168. `product_id` int(11) NOT NULL,
  169. `quantity` int(11) NOT NULL,
  170. `price` decimal(10,2) NOT NULL,
  171. PRIMARY KEY (`id`),
  172. KEY `order_id` (`order_id`),
  173. KEY `product_id` (`product_id`),
  174. CONSTRAINT `order_items_ibfk_1` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE,
  175. CONSTRAINT `order_items_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE
  176. ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  177. /*!40101 SET character_set_client = @saved_cs_client */;
  178. --
  179. -- Dumping data for table `order_items`
  180. --
  181. SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
  182. LOCK TABLES `order_items` WRITE;
  183. /*!40000 ALTER TABLE `order_items` DISABLE KEYS */;
  184. /*!40000 ALTER TABLE `order_items` ENABLE KEYS */;
  185. UNLOCK TABLES;
  186. COMMIT;
  187. SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
  188. --
  189. -- Table structure for table `orders`
  190. --
  191. DROP TABLE IF EXISTS `orders`;
  192. /*!40101 SET @saved_cs_client = @@character_set_client */;
  193. /*!40101 SET character_set_client = utf8mb4 */;
  194. CREATE TABLE `orders` (
  195. `id` int(11) NOT NULL AUTO_INCREMENT,
  196. `customer_name` varchar(100) NOT NULL,
  197. `customer_email` varchar(100) NOT NULL,
  198. `customer_phone` varchar(50) NOT NULL,
  199. `shipping_address` text NOT NULL,
  200. `total_amount` decimal(10,2) NOT NULL,
  201. `status` varchar(20) DEFAULT 'pending',
  202. `created_at` timestamp NULL DEFAULT current_timestamp(),
  203. PRIMARY KEY (`id`)
  204. ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  205. /*!40101 SET character_set_client = @saved_cs_client */;
  206. --
  207. -- Dumping data for table `orders`
  208. --
  209. SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
  210. LOCK TABLES `orders` WRITE;
  211. /*!40000 ALTER TABLE `orders` DISABLE KEYS */;
  212. /*!40000 ALTER TABLE `orders` ENABLE KEYS */;
  213. UNLOCK TABLES;
  214. COMMIT;
  215. SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
  216. --
  217. -- Table structure for table `product_attribute_values`
  218. --
  219. DROP TABLE IF EXISTS `product_attribute_values`;
  220. /*!40101 SET @saved_cs_client = @@character_set_client */;
  221. /*!40101 SET character_set_client = utf8mb4 */;
  222. CREATE TABLE `product_attribute_values` (
  223. `product_id` int(11) NOT NULL,
  224. `attribute_id` int(11) NOT NULL,
  225. `value` varchar(255) NOT NULL,
  226. PRIMARY KEY (`product_id`,`attribute_id`),
  227. KEY `attribute_id` (`attribute_id`),
  228. CONSTRAINT `product_attribute_values_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  229. CONSTRAINT `product_attribute_values_ibfk_2` FOREIGN KEY (`attribute_id`) REFERENCES `attributes` (`id`) ON DELETE CASCADE
  230. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  231. /*!40101 SET character_set_client = @saved_cs_client */;
  232. --
  233. -- Dumping data for table `product_attribute_values`
  234. --
  235. SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
  236. LOCK TABLES `product_attribute_values` WRITE;
  237. /*!40000 ALTER TABLE `product_attribute_values` DISABLE KEYS */;
  238. INSERT INTO `product_attribute_values` VALUES
  239. (2,6,'Youth'),
  240. (2,7,'6 to 9'),
  241. (2,8,'Good'),
  242. (3,6,'Large (youth)'),
  243. (3,7,'5 to 7'),
  244. (3,8,'Σχεδόν καινούργιο / as good as new'),
  245. (4,6,'Large (youth)'),
  246. (4,7,'10 to 13'),
  247. (4,8,'2. Καλή / good'),
  248. (5,6,'Jr.Medium'),
  249. (5,8,'Καλή / good'),
  250. (6,6,'Large (youth)'),
  251. (6,7,'5 to 7'),
  252. (6,8,'Καλή / good');
  253. /*!40000 ALTER TABLE `product_attribute_values` ENABLE KEYS */;
  254. UNLOCK TABLES;
  255. COMMIT;
  256. SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
  257. --
  258. -- Table structure for table `product_images`
  259. --
  260. DROP TABLE IF EXISTS `product_images`;
  261. /*!40101 SET @saved_cs_client = @@character_set_client */;
  262. /*!40101 SET character_set_client = utf8mb4 */;
  263. CREATE TABLE `product_images` (
  264. `id` int(11) NOT NULL AUTO_INCREMENT,
  265. `product_id` int(11) NOT NULL,
  266. `image_path` varchar(255) NOT NULL,
  267. `is_primary` tinyint(1) DEFAULT 0,
  268. PRIMARY KEY (`id`),
  269. KEY `product_id` (`product_id`),
  270. CONSTRAINT `product_images_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE
  271. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  272. /*!40101 SET character_set_client = @saved_cs_client */;
  273. --
  274. -- Dumping data for table `product_images`
  275. --
  276. SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
  277. LOCK TABLES `product_images` WRITE;
  278. /*!40000 ALTER TABLE `product_images` DISABLE KEYS */;
  279. INSERT INTO `product_images` VALUES
  280. (2,2,'uploads/equipment/prod_2_1790588393.jpg',1),
  281. (3,3,'uploads/equipment/prod_3_1790588897.jpg',1),
  282. (4,4,'uploads/equipment/prod_4_1790589083.jpg',1),
  283. (5,5,'uploads/equipment/prod_5_1790589860.jpg',1),
  284. (6,6,'uploads/equipment/prod_6_1790590114.jpg',1);
  285. /*!40000 ALTER TABLE `product_images` ENABLE KEYS */;
  286. UNLOCK TABLES;
  287. COMMIT;
  288. SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
  289. --
  290. -- Table structure for table `products`
  291. --
  292. DROP TABLE IF EXISTS `products`;
  293. /*!40101 SET @saved_cs_client = @@character_set_client */;
  294. /*!40101 SET character_set_client = utf8mb4 */;
  295. CREATE TABLE `products` (
  296. `id` int(11) NOT NULL AUTO_INCREMENT,
  297. `sku` varchar(50) DEFAULT NULL,
  298. `seller_id` int(11) NOT NULL,
  299. `category_id` int(11) NOT NULL,
  300. `attribute_group_id` int(11) DEFAULT NULL,
  301. `title` varchar(255) NOT NULL,
  302. `description` text DEFAULT NULL,
  303. `search_tags` varchar(255) DEFAULT NULL,
  304. `price` decimal(10,2) NOT NULL,
  305. `status` enum('available','sold','hidden') DEFAULT 'available',
  306. `created_at` timestamp NULL DEFAULT current_timestamp(),
  307. `quantity` int(11) DEFAULT 1,
  308. PRIMARY KEY (`id`),
  309. KEY `seller_id` (`seller_id`),
  310. KEY `category_id` (`category_id`),
  311. KEY `attribute_group_id` (`attribute_group_id`),
  312. CONSTRAINT `products_ibfk_1` FOREIGN KEY (`seller_id`) REFERENCES `users` (`id`),
  313. CONSTRAINT `products_ibfk_2` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`),
  314. CONSTRAINT `products_ibfk_3` FOREIGN KEY (`attribute_group_id`) REFERENCES `attribute_groups` (`id`)
  315. ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  316. /*!40101 SET character_set_client = @saved_cs_client */;
  317. --
  318. -- Dumping data for table `products`
  319. --
  320. SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
  321. LOCK TABLES `products` WRITE;
  322. /*!40000 ALTER TABLE `products` DISABLE KEYS */;
  323. INSERT INTO `products` VALUES
  324. (2,NULL,1,15,2,'Bauer Supreme one 20','','gloves, γαντια, προστασια',20.00,'sold','2026-09-28 09:39:03',0),
  325. (3,NULL,1,17,2,'Bauer Supreme Pro','','επιαγκωνιδες, pads elbow, προστασια',15.00,'available','2026-09-28 09:45:02',1),
  326. (4,NULL,1,17,2,'Bauer NSX','','επιαγκωνιδες, pads elbow',15.00,'available','2026-09-28 09:51:23',1),
  327. (5,NULL,1,18,2,'Jr.Medium','','επικαλαμιδες, shin, guards',15.00,'available','2026-09-28 10:04:20',1),
  328. (6,NULL,1,18,2,'Bauer Supreme Pro','','',10.00,'available','2026-09-28 10:08:33',1);
  329. /*!40000 ALTER TABLE `products` ENABLE KEYS */;
  330. UNLOCK TABLES;
  331. COMMIT;
  332. SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
  333. --
  334. -- Table structure for table `roles`
  335. --
  336. DROP TABLE IF EXISTS `roles`;
  337. /*!40101 SET @saved_cs_client = @@character_set_client */;
  338. /*!40101 SET character_set_client = utf8mb4 */;
  339. CREATE TABLE `roles` (
  340. `id` int(11) NOT NULL AUTO_INCREMENT,
  341. `name` varchar(50) NOT NULL,
  342. PRIMARY KEY (`id`)
  343. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  344. /*!40101 SET character_set_client = @saved_cs_client */;
  345. --
  346. -- Dumping data for table `roles`
  347. --
  348. SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
  349. LOCK TABLES `roles` WRITE;
  350. /*!40000 ALTER TABLE `roles` DISABLE KEYS */;
  351. INSERT INTO `roles` VALUES
  352. (1,'administrator'),
  353. (2,'seller'),
  354. (3,'user');
  355. /*!40000 ALTER TABLE `roles` ENABLE KEYS */;
  356. UNLOCK TABLES;
  357. COMMIT;
  358. SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
  359. --
  360. -- Table structure for table `settings`
  361. --
  362. DROP TABLE IF EXISTS `settings`;
  363. /*!40101 SET @saved_cs_client = @@character_set_client */;
  364. /*!40101 SET character_set_client = utf8mb4 */;
  365. CREATE TABLE `settings` (
  366. `key` varchar(50) NOT NULL,
  367. `value` text NOT NULL,
  368. PRIMARY KEY (`key`)
  369. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  370. /*!40101 SET character_set_client = @saved_cs_client */;
  371. --
  372. -- Dumping data for table `settings`
  373. --
  374. SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
  375. LOCK TABLES `settings` WRITE;
  376. /*!40000 ALTER TABLE `settings` DISABLE KEYS */;
  377. INSERT INTO `settings` VALUES
  378. ('active_theme','default'),
  379. ('allow_user_to_seller','1'),
  380. ('mail_from_address','athenshockeygear@gmail.com'),
  381. ('mail_from_name','Athens Hockey Gear'),
  382. ('site_logo','uploads/logo_1790669499.jpg'),
  383. ('smtp_encryption','tls'),
  384. ('smtp_host','smtp.gmail.com'),
  385. ('smtp_password','mdaexymcizvutjjh'),
  386. ('smtp_port','587'),
  387. ('smtp_username','athenshockeygear@gmail.com');
  388. /*!40000 ALTER TABLE `settings` ENABLE KEYS */;
  389. UNLOCK TABLES;
  390. COMMIT;
  391. SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
  392. --
  393. -- Table structure for table `site_texts`
  394. --
  395. DROP TABLE IF EXISTS `site_texts`;
  396. /*!40101 SET @saved_cs_client = @@character_set_client */;
  397. /*!40101 SET character_set_client = utf8mb4 */;
  398. CREATE TABLE `site_texts` (
  399. `text_key` varchar(100) NOT NULL,
  400. `text_value_el` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  401. `text_value_en` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  402. `description` varchar(255) DEFAULT NULL,
  403. PRIMARY KEY (`text_key`)
  404. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci;
  405. /*!40101 SET character_set_client = @saved_cs_client */;
  406. --
  407. -- Dumping data for table `site_texts`
  408. --
  409. SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
  410. LOCK TABLES `site_texts` WRITE;
  411. /*!40000 ALTER TABLE `site_texts` DISABLE KEYS */;
  412. INSERT INTO `site_texts` VALUES
  413. ('btn_view_product','','View',' '),
  414. ('category_subtitle_prefix','','Results :',' '),
  415. ('category_title_prefix','','Category :',' '),
  416. ('filter_price_from','','From','Placeholder '),
  417. ('filter_price_label','','Price :',' '),
  418. ('filter_price_to','','To','Placeholder '),
  419. ('filter_sort_label','','Order :',' dropdown '),
  420. ('header_cart_btn','','Cart',' '),
  421. ('header_login_btn','','Login',' '),
  422. ('header_logo_text','','TradeHockey',' / e-shop '),
  423. ('header_search_btn','','Search',' '),
  424. ('header_search_placeholder','...','...',' '),
  425. ('sidebar_categories_title','','Categories',' '),
  426. ('site_slogan','','Sell & Buy Hockey Gear',' '),
  427. ('site_sub_slogan','','Used and new Hockey Gear',' '),
  428. ('title_new_arrivals','','New Entries',' ');
  429. /*!40000 ALTER TABLE `site_texts` ENABLE KEYS */;
  430. UNLOCK TABLES;
  431. COMMIT;
  432. SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
  433. --
  434. -- Table structure for table `users`
  435. --
  436. DROP TABLE IF EXISTS `users`;
  437. /*!40101 SET @saved_cs_client = @@character_set_client */;
  438. /*!40101 SET character_set_client = utf8mb4 */;
  439. CREATE TABLE `users` (
  440. `id` int(11) NOT NULL AUTO_INCREMENT,
  441. `role_id` int(11) NOT NULL,
  442. `username` varchar(50) NOT NULL,
  443. `email` varchar(100) DEFAULT NULL,
  444. `phone` varchar(50) DEFAULT NULL,
  445. `password` varchar(255) NOT NULL,
  446. `first_name` varchar(50) DEFAULT NULL,
  447. `last_name` varchar(50) DEFAULT NULL,
  448. `created_at` timestamp NULL DEFAULT current_timestamp(),
  449. `is_seller` tinyint(1) DEFAULT 0,
  450. PRIMARY KEY (`id`),
  451. UNIQUE KEY `username` (`username`),
  452. KEY `role_id` (`role_id`),
  453. CONSTRAINT `users_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`)
  454. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  455. /*!40101 SET character_set_client = @saved_cs_client */;
  456. --
  457. -- Dumping data for table `users`
  458. --
  459. SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;
  460. LOCK TABLES `users` WRITE;
  461. /*!40000 ALTER TABLE `users` DISABLE KEYS */;
  462. INSERT INTO `users` VALUES
  463. (1,1,'admin','sparmaksitzian@gmail.com','6943078334','$2y$12$eIpc5tWDqNHNhGwW7VJhpOIc0M1twWFgEu6MSt.kgs.GjdbAmyTjG','Super','Admin','2026-09-27 13:25:04',1),
  464. (4,3,'eparmak','maidawmn@gmail.com','','$2y$12$POty9nKbADIDWVf/mNOq1ePopW4Klq6rn6OXrJfETed5FUvzQLgUm','Stathis','Parmaksitzian','2026-09-27 21:50:17',1),
  465. (5,3,'parmaksitziand@gmail.com','parmaksitziand@gmail.com',NULL,'$2y$12$S4OUCHLVBhzPoeuUnZ1DNOvfR5SuOi92OoqOZ.yj.z9g375wBPMYO','Dimitris','Parmaksitzian','2026-09-29 07:46:37',0);
  466. /*!40000 ALTER TABLE `users` ENABLE KEYS */;
  467. UNLOCK TABLES;
  468. COMMIT;
  469. SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
  470. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  471. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  472. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  473. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  474. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  475. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  476. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  477. /*M!100616 SET NOTE_VERBOSITY=@OLD_NOTE_VERBOSITY */;
  478. -- Dump completed on 2026-09-29 12:29:47