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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$RnKivz9UOY95/H/2C8/LJizSFxucKFiuvVUFEUUwTCXedmkXp1kw8','admin','ak_bedddc12f56286cb','2023-08-12 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$Fs.5AKtDvCKlDqM2dF6HyPxMibft.9GmG.uEgd7h47Z7eKTcL/sOf','user','ak_29ad5b1af3346b64','2023-12-01 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$ZuFw0Vfv65h8iSGSDIdLQ.9eNG7.SMjRXqUpQvZMBgku81OYGay6Q','user','ak_5afc04c8f53859b0','2023-04-19 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$pkL884pXWZK.BIjPl4EHhuM7IR2ibDvlk3LEmA0gL3viV176Mi0Rw','user','ak_4f74e62e8d3c8d74','2023-06-26 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$NZ/GWT4MfFqCsUPnJMrdUQpBcUPu2sbO3CwEtgKI0JIJpiumu/dx4','admin','ak_1c04c0af9e6e75de','2023-03-22 10:01:00',NULL);
INSERT INTO `users` VALUES (6,'root@example.org','$2b$12$yczJfl/eYuoJhVpFbtOm3fADQ4y8kqLwb3Js8Q0OCamUOL0dgKG5B','user','ak_bb0beb441a2c16d2','2023-02-11 10:17:00',NULL);

