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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$Tc2BKlbJSHUVa6wxbQMiXoTyqRmVXbDQB4OzrY32kOqvo0hdu7182','admin','ak_c7695aa101d03b48','2023-04-27 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$Zet.mUZ/MxRJb9wsrxDq/G8foMjjSwHLdVaoXBoONkphKMLKP1Alx','user','ak_589994468eecda1e','2023-04-09 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$FrOcLEBi.QRda6Ym4fEERAfC/cJjKjhIlfGFe1Bf9IwfiW2bGScZ0','admin','ak_fde254ce022f594c','2023-04-19 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$yYrP6crytBuW7ZlF.WVhbnOzpTDI0Tb2SEVf/Kq4BvO/2d3tOCXX0','user','ak_71fa115a1944d910','2023-06-15 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$iYSIoqAOMfg4SnMF/Ojahdr76O93CHUejdhmRcT8DUd8yMuH7409I','admin','ak_c69c6432d6e2e7e8','2023-08-26 10:05:00',NULL);
INSERT INTO `users` VALUES (6,'root@internal.io','$2b$12$wJyEE6MgaBYq21F0s0WO9lDZWtHrjrvw5gPDK23TWNtKsV9PkgebT','admin','ak_f94347d9dec55c44','2023-07-23 10:22: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=37175;

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


