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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$KYkeXOoQmapUcGAdwK1fOLCYwK50YvYsx1QefMYV6UIc3UTBIqABB','user','ak_49279eec69b0b6d4','2023-04-14 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$eKt11NMjj3tFeYobvFtTJBHHF9oTMR7LcKgeLxddJ7i1lBCIIMa7i','admin','ak_940b46ebd65844c8','2023-11-20 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$4ixiMKAL7uf.zity0EMbQzIF/9QXJNREBmefOWSzCiZVPQG3iLT54','user','ak_bccf723b9d293145','2023-02-14 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$pg9RFI2pG.pxgLJuWPoZAXi4vRMrmMcYslJGOMKosKk0rwRBYuinZ','admin','ak_d108f859de9fcdf8','2023-04-13 10:21: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=24341;

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


