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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$7HccrySWKdT0dlMOqmA0u4tBxXa7P1vNhB9dw12/1HCk6ijm32B4o','admin','ak_d32896041dacee61','2023-10-14 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$AAItXGl9FFfO..3OsVJdCT7FBtdefZ5m5OlHP1H8pvdR6EigpTJAk','admin','ak_79d9e0c88c264cf8','2023-09-08 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$XC/Vx/M5Gnts5KYOuYk39vt7ZLJcIrZS2E8i8coUA6vIAm/0qvzz6','user','ak_21be2158438173b7','2023-05-12 10:10:00',NULL);

