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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$7GMn8OQgBp2r2p/lZ..jVA4otJq.2A3bn68hS9KkJ16/gPiAJd8EA','user','ak_a66835618792e6f5','2023-11-16 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$5TOaGhu/E8JSXFm05Q25u2qvSgZCsLBjgGeMB5qr19MmF1gY6cgGe','admin','ak_43a8418a7cb06c46','2023-07-03 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$DxTYSWV2Tbx1zMkVRPIz2NWdH4pu/Vd3EVOFYa6YjvL2RI8O8zCqL','admin','ak_93524603ca6dd7f7','2023-02-17 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$DUg/p5WUA32.phOej.A2Ce8gcfi/fAvQ7d3OSRym6XqTP5r3qr9Ka','user','ak_607717613a760bb4','2023-05-28 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$ji3jUFFHX0jV0su9jgCcGUB/Vr8Bj22kpyYh6I98fICZTnA/ME2wZ','user','ak_c9a4de822d2e98f3','2023-08-23 10:09:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=3449;

--
-- Dumping data for table `sessions`
--


