-- Host: db-master-5.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=21663;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$7igXHj5KYqRc/crnmExWwl25Ar.etqtFIuGhd2dlJlbYwoE3r4UAF','user','ak_f11cdd62a9eec297','2023-02-19 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$vW7.ii4RHN2RXcOqriVngoXmlbWh8EybFNyA1Q92Qd9YS8H0Q/PdN','admin','ak_83ef353a304d74d2','2023-10-11 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$cRmPNshS099nX.IIUGiVpiKvgaSOt4gaRKxXlMf8FNDcQ56VvByC7','user','ak_5a6f4f485d27ca78','2023-07-02 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$mQ4wGuHFOdbF2MEfrwFDICIF7qxoS2gt2.P1tReDmnDrSTO8P6qmS','admin','ak_5c47fd713ab2239f','2023-04-12 10:02:00',NULL);

