-- Host: db-master-6.internal    Database: webapp_db


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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$N8oLSM8ydtBy9fOmYmXqerY.qs2amBLxFEbuU0t4.EoAZGEQkLIk6','admin','ak_ae3561a3bb666a53','2023-09-02 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$t5pqx7t03y1HBGbUwSJ8le..4AL8vr71E8DmbEb49XwKlQ5ZbFamt','admin','ak_e166955ceb01c775','2023-06-01 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$OvFQ3/YwU0EU2hNYwGkXsNik/3E1DYWcKmCTtNAk4G9V8sEWR/m0H','user','ak_2a18c2a25bf2f1a0','2023-09-12 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$VG4x6t5PwJc9Dk6tO1Q6fxNLLWFgtbuLAjdkpo/4Ij79fy6lb9/lS','admin','ak_f1c0d41a353a0a42','2023-11-05 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$T4t/Moc6llXC8Ck1npDlNHSHThTlm09Bx7An395qd6EvUMy5nd8zI','admin','ak_7e53b029fd1f5dbd','2023-07-07 10:00:00',NULL);

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

--
-- Dumping data for table `orders`
--


