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

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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$AhK7mxpNgY1HqMmmRg6uEUBRaJJ.gTOKixTAyHt1wMmGzerYp1kvV','admin','ak_5e8aa68422efd0ec','2023-10-05 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$c.SFndjjExkLrFdTeaLkUZVJ204SsVg3rmzCcCgYeRURA.CDaG5ff','admin','ak_6b4dd206af77099f','2023-07-08 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$iUcFqvheILxdY4nNPhcg69tnN12hf27L7/EXPrQ5.zJAWVLfpdRl5','user','ak_cbbae6718f6db0c8','2023-09-12 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$rYg7wk4xXNEpfqxM2UCNyHy5VAtMCjpmqAFT0ho4kbbXvGQCrzAr.','user','ak_f102a235234143c1','2023-10-19 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$ECWztdaq9tI1qnWCs4DP17cGr37NQ3XFITBHVa/B72CF1XPjYOPwH','user','ak_36e65ac72df2a9cc','2023-09-02 10:16:00',NULL);

