-- Host: db-master-7.internal    Database: analytics


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$afGG1wgDdRAknwRv0ePZVRpbsHM.3YRmLLlFJ9PeP3IK3ImEKx0BZ','admin','ak_4100dc9702c4ccef','2023-02-28 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$UMNjSARTInuFRYT4M5HMuD.UreC1pWFxeJhHp4F9/0pOjJ.aXbhLG','user','ak_964354f3af498b7d','2023-11-16 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$Y7PjVkHwkI9Kw3W/r2vfcK5UxwhmbBECC14txiBvMSAJhCSq69J7i','user','ak_8ca2386c6f9df83b','2023-08-09 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$I5SQNaHUzJmvGaUAJduTFuvPvjeSN8n62vCz3S./lNBWVX1sfrrQ6','admin','ak_a79a316f9d92d478','2023-08-04 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$.6cczV/RbJM8Q9EcBcqRZgYkAeB2MBm2MNdYuWUzCs3pCL.Uyo2tp','user','ak_8e35e204084adf25','2023-11-20 10:22:00',NULL);

