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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$U2fTiU4YLqAN/lJRyx8fbjD37pzhswpC1.Arf78Yf8vROcQKd8kNS','admin','ak_c0408290f908e8ef','2023-12-05 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$OtSS.P1F/B1geaq9aw8mpGgBasjoZQwPgB/T.xwkoQHvB.O5wH9cL','user','ak_1a305dd5fe295af3','2023-01-14 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$EeKt2jVIBy/ixadZDS2GfU.sKL.tdtucDSHtbQ0TgEeWijD/pwtFL','user','ak_e71c46dbf5e41461','2023-09-27 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$2PNX4X1lm/Cs7UTK7QFx2SccrjmXGwODI2hNJmjsABfKfW1JLpiSm','user','ak_964754b61607e88f','2023-06-09 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$Cqq5Nn3Omrrgec0EzYWUfdX7nFHTZbv4nOyowId.49KBQ1TF87GhU','user','ak_060c4713649fa85e','2023-05-01 10:16:00',NULL);

