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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$j3Q3lPCuvfVXVEpyF/xsmdghugZcFqD.RLJjG2L.rkATk/AbxZNx5','user','ak_379c0902725e3518','2023-04-20 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$PrWy/iUw7BEQBTpDRQljT0IPPJfgLagok55Rk8qiFDdkWrLDKoHRA','user','ak_736313a2b7c328b4','2023-01-03 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$vdotasWTQRjymrYHUqGzS2kkh7J5PNjO0po3MRdNYWEsxIeACEfb4','user','ak_50f77dc014368467','2023-11-21 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$YFfSzGGX7CsWbk.Slxbv4L4HX2y7.00YpM.wU5SF2rgitMEyQ9Leh','user','ak_4daf0db5421061b0','2023-02-16 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$D89rV4jyxSAd0tu1yr0f/zdC0YwoKfS2179ZNMLkGK0NJxl.shyDQ','admin','ak_1bf93a66bbeda3ac','2023-06-17 10:14:00',NULL);

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=16335;

--
-- Dumping data for table `orders`
--


