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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$Q7L2iKHDB2kVtSgtLyQzTZIF4XmbnCXcVznDy1vEraC.BYfy79ReM','admin','ak_3dddba481014f551','2023-06-04 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$7eGIEca47Fdg18J7sv8MFAkKBybHuQ7Rt56IU15HorK0EG6wGhHOv','user','ak_ac23e1c8437208d4','2023-07-13 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$ncFtFuG2g2LwV4Xo2gtbirTpMEVdTurs9Xv8VLEPm3BwK2./AWocY','user','ak_80aa3c0beabf2620','2023-06-22 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$qryG7/D9j.BbidrM8g0S0zN4xIue2dRIQFyZUPpi6uvD0E4UBTaW7','user','ak_d945190f08922ee9','2023-05-03 10:16:00',NULL);

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

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


