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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$yhXN3DxMrcr9XPX6PyaP08MhAQldXuMoq2c.3JLcOzvGLTD0KATMw','admin','ak_f6d970bf271e860b','2023-11-03 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$S3ZlT/xl6bnle/Bj8PF5lrGxIeVxoBDq94yUI9OtX9I.6bAGtRzvL','user','ak_aeba810350d484e6','2023-12-28 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$xZzWsy1a9GPDWUT58ZUAbpKNYxfW.5bXvIO4MNr1QuSlHZHyq399Q','user','ak_affb24ac51479a03','2023-09-05 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$OQlbq6gpZ4pDzQI2RcG5b4ZvP9XHtF9R9BKdh9FRyIqDwCyCLEZ2n','user','ak_b09350d47d9323ff','2023-05-07 10:23:00',NULL);

