-- Host: db-master-6.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=11168;

--
-- 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=19130;

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$ATVbiAT36bTgH5d3mafeAG9Bu6HZLwOb/WbtHoup.hd4rqSpDMMFP','admin','ak_2f4d16cbf633e4ad','2023-05-14 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$T2Ly6aY294aEH5i8ydvvEbZ1PzzNYasg.msdoKTjPv3d0CXV2NBgj','user','ak_bfb049591b6bca26','2023-02-08 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$sXamx7d40Cm7QYrti/QwMoyYgOs8umFlgBTg29ZaKfXKyPZly0xf4','user','ak_89b868874b71d9fd','2023-08-28 10:07:00',NULL);

