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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$ijvSPyI..kpbkZ7DN6urHZmZL5akIFEWNsvfbFVAcCsxZhhh6ZoaW','user','ak_2dabcd86d4c9364b','2023-08-17 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$QsX0K82jhixGJ1IMEq.cZWN8.3Vp/QCmv7YU5FXKgJlcTJwMXcyTV','user','ak_b6a0af93fe3138b5','2023-02-13 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$10dgrYQZ/aB/oFsoYJwhNRc/Vhw/o5cbt675W81Tzl1rIXnd9GetW','user','ak_d696d622249a64e2','2023-01-02 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$B7snBush7MrAZdaMxXtdzTrbtPPQ/nAVEh2EYbJH8ulCMSv6aeoj3','user','ak_a44e16591bc776bc','2023-10-28 10:09: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=17617;

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


