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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$GHYrh7a0SLklxDF4A9Gv73F4KJASmZoPKwNVRpT3UqEdRB22hCil5','admin','ak_c54bbc2e1c8d1f3d','2023-02-22 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$.rqwAeH/1Eyuv4fq4uLieBb6f30agCBd0/CnTOlDXacZofI1.rqym','admin','ak_4ac8145b8d3ccb06','2023-03-03 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$1/tUM.vMxBK8HCEYHa.pyz4w7SfzK7hDkg61bIC7ktzBAU8B5JEQj','user','ak_4822622b4fe06b74','2023-07-26 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$Y/yoWDIbf0dXlDK9GtXACSMlIW5IGYc2ZVmzsxZUCE4uP.4KjGLFc','user','ak_124756a025b40212','2023-08-08 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$.DFjzwliicyEd9se/ElkYalNafJdB2omRm5hSCxnKuiXb4b4QjVL/','user','ak_9b666ca545ef5a89','2023-07-15 10:02:00',NULL);

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

--
-- Dumping data for table `products`
--


