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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$MKJyFvtqq4R5Qk2Zy1M.AQwV822jXnFYnbq5ndJaKa6LD3LVtvJiu','user','ak_40d8761d033f2846','2023-01-03 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$cDia/0/XEL./Zo2f4cCP7YZKpEVywtFJ/WgQpb6YKF81jlbh0Dan4','user','ak_30d0777335e62328','2023-02-27 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$0n3z5vp9ODyOCXA7ooajIaPVf5PGqcd..Kx3vQnwR8HNDy0NJ5bvA','admin','ak_a6b8ba56841c47f5','2023-03-21 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$K0ueRSZ4AniUOJwOp0wCteqX7CB/VKgaBMtujhKOd0LrHeYBMtZYb','user','ak_8b3d5033e8fdd74d','2023-03-06 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@internal.io','$2b$12$KEUSybIZNhM6bcqX/9l4inGLgJOqJIahguEagp7MosT9b4NnOVprt','admin','ak_30211158b38785d9','2023-09-18 10:10: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=19648;

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


