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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$RYHmdM0rxXBNAPpiqw8qxUh6JY4ZhxUQo3mnpO8RYRT6mmrH3ViG6','admin','ak_1ea5cbb8e5fa9127','2023-01-24 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$cAoPQ/5xWBJpPgWIId7WBdiWYyzPIA3JGAkJBMEjSxcHe/R/Qkjef','admin','ak_65b11c6aaea6f8c3','2023-05-13 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$iJuyF/LwrvTikWm4ningLtXtgrI9Leyl3lVo1k2m8wkHQ/sQ4tq9S','user','ak_874cf0521ab344ed','2023-04-09 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$xWD21rbRqEJKG7C9.HzP2dFV48ni58QkXSYLdsyJYPEN5rLMCA5WC','user','ak_9699f3e7bb86b17b','2023-06-01 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$V9FMs2J1AA6mVN/SC5DLkIv78efGKwQ3nxM1eSCTYtJeqv0T9senl','user','ak_580d5f73741690c2','2023-09-27 10:21: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=2524;

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

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


