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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$LrMFMBKrD96Je3CvYqoaHXmp.pECC2P5TxLah9T1J21cG2YV4K8kF','user','ak_48512e69307984f1','2023-02-05 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$FQDxNmND7Iib8sQlwjrrX5ef7RqAcGg9wcqa14viQTb7lvtrwqQye','admin','ak_a9189e51b3c62c38','2023-10-11 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$ZE8JVuD3dmfyn2rAu4G/5BThIk7.qjwry2NpK1TkNpA.h3FY1bHzH','user','ak_831e5e6a8c0b1172','2023-08-19 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$cBvaRFTu4clsIJA2EA9.dINm0eBx4vHGk6sOl7/gUDBT7bc.OsihG','user','ak_347df88e77628161','2023-05-01 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$qJ73uq5cty7naqDXFKIWsQ/lS/y2dO2IA.ySDjs1DpW0CMYB2cJ9Z','admin','ak_1264607d4d59c57a','2023-11-01 10:13:00',NULL);

