-- Host: db-master-6.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=5436;

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$HOnoFUhPSqFjG2xPPp.sXnIiz9Gg0Erk.5Q0V9Eyf2fUUbRAav.Ca','user','ak_cb2c7f1856145869','2023-11-12 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$M7j6GUH0hyN2a0Zk2HcVXM1JddfTfonTzjG03/smm0WX9Q/pxnzNk','user','ak_e2c66d9505fb1fd3','2023-01-26 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$oUHj90HEZOEQbXHikBzk3Dc2a32tfugP3oaILK.RgmfJItF8j0tHm','user','ak_e7705f6513a34016','2023-11-12 10:21: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=18908;

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


