-- Host: db-master-8.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=13459;

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$K6UTA60fNllFqtjxGdg2rRMilPRvjlnD0Xzl98GUHUx61TqPkfdWZ','admin','ak_205f130661c486f7','2023-04-14 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$.vs8JgdJpgDsbc5xKK8.4z/cM2JaP22zutmQRxZ/APghAtUgidfav','admin','ak_578757f377d14662','2023-01-25 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$t5DAIB.MWpgVEzMIpXmvGQrh6Cq4eG/8Hyuz8ekWNduqsidHS8G9r','user','ak_c78a42743ab04c19','2023-05-13 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$irfWjkWE/R2gTJIRxRTxm25NSRLflYrT7aTj1qM0yb1XH7Wy8rtDg','user','ak_829d4e815b7660cb','2023-07-21 10:00:00',NULL);

