-- Host: db-master-2.internal    Database: analytics


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

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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$CqkqFBVMvbYnRsBO1iCOu16bRMYYj0TC/0PzfZWCJk6pXiw8KNNbf','admin','ak_bfd611c663470634','2023-07-07 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$yRCNP4BpAi.wITS4WQ6CfcW/25hwEzGtXbeUkmDo86OG5ZBaxOTz1','user','ak_81d14cb5b9c969ea','2023-04-27 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$mEbKGL1DmZf7SGCn/DPCJQO5Jx96SNwxCiB5FuGTnRJuNrCpduBQm','user','ak_ac1c981d2135f5d9','2023-06-21 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$mdq/UlgUmqMk.nPWGLXt1DTLLSnZu.8QOU7DbE/90geyOgC.I914J','user','ak_f3f11b0d6814509c','2023-01-04 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$NIJJBb9Pqlsz4N6WsnhCOszEq3ddLINRrlGSyi8AVEeocxvgZo50i','user','ak_7853466fe9bad1f7','2023-04-07 10:02:00',NULL);
INSERT INTO `users` VALUES (6,'admin@company.com','$2b$12$OXEkJzOe3Ae2WB7ZkkX.QjlgT7xHpyrXjQsu8q4tu6jTzHkIlLj0F','user','ak_16c2d30c46fdc679','2023-03-11 10:01:00',NULL);

