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


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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$Wl8dFJwEva.YCNZ.XkuZlObCUxgEkfexfN8o/E28DE5Igvc/9CqKz','admin','ak_bf37f771c3d58818','2023-10-05 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$YuUtAL6V4upBV9rFAi0ECMHK68phrrzC/CRlqaKrecgjoWCzX560f','user','ak_722ec59bcdb47c0c','2023-02-17 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$n9KdOu3/U9GYqEBzwmK7OodOkl.ELvOJmGViddEKZqUANvI.goip.','user','ak_cc1fd00b0c057698','2023-01-21 10:09:00',NULL);

