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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$PWAXTb36yWb8WPOSbIz9XhWoS2i2FRGqf/L8IV0JOFLcYmuGOqB9f','admin','ak_847ae1037157b252','2023-11-15 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$G18qCIycyTswgTXNDOLUiS9Kg/VGiHYOR2Oj7oOvjP8LudGoiML5F','admin','ak_efba221781674837','2023-03-05 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$2lEpxTlJkKA8SJLMIf/71NRv7j7VZZ81q5BqncUFVZWlZy86CmGIH','user','ak_d09f3a48cd71e1fb','2023-11-06 10:08:00',NULL);

