-- Host: db-master-9.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=2116;

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$Ba9CUquGxry5BnWtyGxhzZj/7QjtmhQSTxIelZlIk9iS6DK7AgNJY','user','ak_978970ea8a2abbb6','2023-05-19 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$RLsqUzQKya7Vj/LQuLk.7XDgf4IiMv568u0SnEjqcwmrY/3wrq1wm','user','ak_cb85450c3f923db5','2023-04-25 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$Ae1qssE3VTc2HxUOHfqUZxqDlxD79ZfgNtmzMW6pUHqzVLShQjncA','user','ak_420dde591f15ad96','2023-10-15 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$JZoFQCshmIWRK4.0omp8Q8OguRNllpn40yELj5mRWL/8v/ZcyhdQo','admin','ak_226a3df7fc5ea55a','2023-05-07 10:18: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=37510;

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


