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


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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$BUhVOkAGjGFe2Obc82o7zKTlQXwTeBA.j9CM0NWNy7CTIieC0w4fV','user','ak_c75dc2ef088da430','2023-05-11 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$cv6dxuLe3.Dj.PLCKiKAGm0hZzPAYqcQR4v0ywQ7cOW39bHIoXtfb','user','ak_5c9e90cffaeae634','2023-05-23 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$JZFcKikNmLseZdATqlhQbIoHSMwQi6Z7wU8URwTOHwwJ5mp9B01Uk','user','ak_83d455f04d71d34c','2023-04-14 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$mcyqgR.d7zpTtQqhPOyiOpG846xC1gCL2s6QuqEND9lY.VwBR5Vci','admin','ak_dc66f76bee26e41e','2023-04-16 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$Kyn47sP8D5i1ejGscaVu1WPmuNpKP7ZzGkn3GV5bsyZefiGoPbl7Z','user','ak_2f08368b0431fe4f','2023-04-13 10:05:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@corp.net','$2b$12$sGdWKan.SiYJ2DFTY7gCHbafouhufRGg/aGxzOi4PtGQ56gLGRX.D','user','ak_11da67c7d62bb19d','2023-01-01 10:11:00',NULL);

