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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$fJZ9I3rLElKh0S4IZNjtm2aSZR9/cbMHUkUh1yZhyc.KMRTU2gEtQ','admin','ak_632a47898d8bd443','2023-07-23 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$PG2RhjfhVxRgBJF6wjVf/TQHmQHeCy32LHz/88Rfy70y2fWBtZo.L','user','ak_075f24c184bc7274','2023-06-28 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$zrPuL6M4cJ38tvAlspAcb0DT9PmicOzcwWPEKKYc30msypjOpe.KY','user','ak_d0c7372dfe6a62a5','2023-06-24 10:13:00',NULL);

