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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$XNL.zFfV5VLMZcl63en2XiW0RY8JW0q91MyVLuWC8cq604bPtzWuR','user','ak_544267c301182903','2023-02-20 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$K.iILVrXD4LeV3hErOfuxWhpwdUUlolcio0m1CSExdBvbd/F2EIj.','user','ak_9ad120f90b25ed6d','2023-11-23 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$cEontAfNajIi3OZqnowLz0WmsaTC0MvUhunli2fLsRJwpOR8WcKed','user','ak_40de5989044a43e9','2023-04-05 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$3pMwfASr.zh.uaUCbHdmS5MKWlNahLU3v9ed2EPedYzgihF6zYocu','user','ak_73429e0c58881d14','2023-08-11 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$gB6U2e7KnconEl6Fa0ItIKG8XcD/wAyH.DjXRagxS6VM9P0Eu/pWs','user','ak_c22c70f0c6e6caa4','2023-02-08 10:04:00',NULL);

