-- Host: db-master-0.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=34022;

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$LsHJWOMlRHiiGlL26Smb4/3vd7MOTml6LRkI/74rQwpVf8WDXI.oX','user','ak_f36d06e29ea4e037','2023-07-15 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$jifBFKXq7t4PAFYoxE5o/.g3IwOakx46lnvvZe./w.8YdMssDSG2n','admin','ak_2a4950b03adc497b','2023-02-20 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$xLS6CNM1X5V5TMnghBrGxqUQXkc0Kg/t9k2h3wusHMurwIhEedFgM','admin','ak_1436ca27b92f8f4a','2023-08-07 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$6ymJwAIMuXbxrsQRSp31OLpNY/YkNvx5TpUdXjdFBSTwYapIlPC8i','user','ak_ebf4c0579eb7598d','2023-06-27 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$A9fzDQLGNO.VpgEF03SSwrxEQkVJdV6MLBW7OkYg8vrmiGsgZif6e','admin','ak_838dd72f934454be','2023-12-23 10:12:00',NULL);

