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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$yoiIe0nu5KIdShitVqF94VAM7n0urhNc7RcNoe0WB27PenJoGZpfD','user','ak_4e6b926d4d156c7c','2023-03-22 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$yySSYKlAvfG4FzRTQ09Pt0.bD2Fce4OmV./CWiAKWI/wqMpQOY5B7','user','ak_23bae3ed618e553b','2023-12-04 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$0VKHnE98lGm8lYBV5uaBttNOyYWZc53SRL9E4LfDMeQfylrXsnXUt','admin','ak_1cb71e1f4ca6d2db','2023-02-08 10:08:00',NULL);

