-- Host: db-master-3.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=4373;

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$cHHz51SAEIdO4igPtlTaIMASrP8iHfHescTIZ1GRpQmBQnEAH.s04','user','ak_b799a8e1c541e462','2023-01-01 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$GE1GJW7hIA1wQVcYesXacfCfkvHP5GOF9XK6Y6RusjDhPFl0LxdB2','user','ak_1b761d195ffa1168','2023-12-25 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$LOLzc5ny.HCtQegAutnskkx3xEszbVY6Ni8thZJmcUxGFFQPMYIzj','user','ak_0e976d4d9b3aabba','2023-12-27 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=2312;

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


