-- Host: db-master-4.internal    Database: ecommerce


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=14257;

--
-- Dumping data for table `products`
--


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=50327;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$dHqyBwiL.iI7UzLr3D7/.5J328OlNnr/lw9dFu.GiJfHyGlYJjoTJ','user','ak_ef4aa7cf706890a3','2023-06-02 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$Q6uoPT7q8a4nXWCIrxIwtdIBnwnQtmxiMTqKx0CIbwKPggeB0uemD','user','ak_b2ffbc70c2ebdbad','2023-03-11 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$MUmC0WKHepvtAJ2cZvE.VGOPK.fua1plNZPLOhFCRBxiwniDzGIBA','user','ak_e0d9f3d92d9c3d1a','2023-10-15 10:09:00',NULL);

