-- Host: db-master-5.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=2522;

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$hhcOW2jtpPrOqW4Mm7zGH/g9bUjK27qMxgJ6LQKYyW9liGG.l8A4.','user','ak_fe53441ae04996a8','2023-11-08 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$cdcRKFkLDh32265WB28lpeE22elhbm4J6eG2mH1bKzTNI6vHlI5OG','admin','ak_689953b589adbfac','2023-06-02 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$IkeY5DDsMDTpB0LcSAD70IvSfYx8AnsLGmd8let7wRH.xuRwO0HsY','user','ak_70f716430d0ed677','2023-04-15 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$Rymw1pqjNOLB3nSkThLVi6MOfIC2AZr/XdHQ4FTaGLjVVptBQ5y2Q','user','ak_6119b3ea9c4ca678','2023-10-07 10:23: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=29992;

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


