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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$qMMMi7m8UHiLfcLWWJHpLg1x4Mso/iAZ0wxftG8aved0OZd8XMZAs','user','ak_9e1fd22a0e24a497','2023-11-15 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$.nw2Dhxr//KycxDieMf8pbZpRTJARVSeJf7FZlitGxTQhRdEmeKxq','user','ak_6af7464d9d54054a','2023-02-10 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$IfNSxsd/jOCS121tBVqZOLkixQPJLlIawiBevc65GVyFKtf6ZzEVr','user','ak_10d96e80170c7f8a','2023-02-12 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$KLD.nRysR6EDIPU8xSeneQP4CcmC38fM6t4DgUVPQWTnCsxO.S01L','user','ak_680fb257bd07b738','2023-12-18 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$/kEkKA/wqHm/v3toMEM2IsVY/D.MS11DYp0ely5XIgiUtHlSUZT9O','user','ak_7af1ee5f2a1c757d','2023-05-14 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=16516;

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


