-- Host: db-master-2.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=11322;

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$5LzEBqDDsdS/aWeXkmiXcq9Ith/cuCjx423ZYouzupp5Tr6i3jX3T','user','ak_402305ee07717bfb','2023-12-16 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$EPtBCtWBKt6iaNjHY2JlMGeenB/pzjJ4lMUpUAmS1yIeYgxEVLX/3','user','ak_f130d8d799ef2fc6','2023-10-16 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$pffNrPCoksIDBVEm3HCRzWfA/4aUSUOU/sP9botpVIxQaW4XfY9.K','user','ak_ca64d7109ab9cb65','2023-07-15 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$3HyPGI8FGrR2f3pPpefWr7oAts7CJEi.tofGSHOldvzgDlz0ee12m','user','ak_b04e5e567688fe2c','2023-02-05 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$B9Az7WPU4SZnzHsYkcMBbdnk4id5kSAwanwkO5sdpp/YP0ojM18t2','user','ak_fc0c6383606b3b6e','2023-06-01 10:14: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=9242;

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


