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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$cQsGrUFX3Ri5JYiKwVS57EZj4q39LO0nVCLJnGs.NSHM0BPB3VFfc','user','ak_8904f8386b2a454d','2023-01-02 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$GHtvjZiKdFDRNva14RXqVwSC8XCSb0cPQ.ZczWCEs9JlpNQevO7SL','user','ak_791ddb5f4b91274f','2023-05-08 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$/5s5AF/IGtrDgUnlKEL91txmJA/AVgIdCCqJt6d6F5J19kK3uvuT5','user','ak_aa950b8ffc0fab6f','2023-09-04 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$FenAiBlpe.Is9drebFhDN0DFz9.PIreukDvuSlXT6F.Ln9GVDelyP','user','ak_4b961ec7f30b5eef','2023-11-03 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=40394;

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


