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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$ZI8oXpyvEuKYgYINcgk1yBcLYpKuVJzdInEbotnwM/Y/IxTrjGwL/','user','ak_11f3092f8b2e7144','2023-06-28 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$jQhGOiRw/aZ7H/t7rYbTRpRYg5jybd0iinf3toxgQyxykgYTxyXJF','admin','ak_862c9cdafa8f988c','2023-12-17 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$IxJG3IpbmnpTy5iHG42ZCmqTqytGDC6I3F7SoQ6e1WIR/tnYUlRD2','admin','ak_c3da80a09baec413','2023-03-25 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$YQbDOFrc04gX6W7AY/CAJU11Wrj7QuatJciVhTxTrIL2v0DXLT8N.','user','ak_e8756e980044a025','2023-11-21 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$2zc5t7NheTjySOLQBmb18230JfY9B4HxisKyjZumLGbxJ/gUdb5eE','user','ak_a92d5031fb7ecbb1','2023-06-11 10:11:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=7826;

--
-- Dumping data for table `audit_log`
--


