-- Host: db-master-2.internal    Database: ecommerce


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$IEhWIGnbjYhTKWZguGpkG0sh2f7NnJA1L7b3wDk3nbwu965Z445uM','user','ak_8ca3252838dd62b7','2023-03-12 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$QLMcTjb/xZGo8YTHAj.AldvDcVrv/pgAR3DoxZb6TPFqsHQLF4vNk','admin','ak_f2d1a82a332b6f04','2023-06-13 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$zgfoWTdbVowUW8aYQiGUJz81fcUYXjpSC3lFhOQ95FhlMxHUp4rjN','user','ak_62d5279bcc8792bb','2023-10-09 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$ceaCkX9Rh7Vo0crhH5PH9aRQJSWMUOIi5pExamJgmXkXLBJu0PyUR','user','ak_8841ee3fe576b82d','2023-04-08 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$bTD7aaHCT.cT.GyWzPvwE8y3Li7xlMSw3Xw1zAwcXYDKCrTViE5cI','admin','ak_c9cb153a54bcb53d','2023-06-12 10:20:00',NULL);

