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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$JWdGf73SAKcgUOmxAPhcjlerUxjGpHGrnjRtDWiFRZwfMr26m.IJL','user','ak_3635f946d73c4375','2023-01-26 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$Bhd5gASLh8nxD8tm4V6oVEmFLgZQ4SGv.YSn0M0O2S1kj2ad3/h37','user','ak_40e23acb65ef3a9e','2023-09-05 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$bCfccs.bRimtcGc1Zkj4P2fT6MsrjqjnMAVjrI9xAzxJqF0bN3uq2','user','ak_65f8c513cdf16b39','2023-04-26 10:01:00',NULL);

