-- Host: db-master-0.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=37713;

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$qH2dCKHNnQrbGU3FdWwr.zVVwZtdVKIzdP3WfnyBe3.REVIjY3rLQ','admin','ak_be0c36fd697a7a46','2023-04-06 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$UuG6kp2ECxMXcpzoK1dnohLF8xsHahnrvb.3OUFpscwLGUVtdZDiB','admin','ak_193d03049f1073b2','2023-07-28 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$Y939O8tMliSc1M/0j3jqYTCDmk1kScYhGEhvWGWx/avcXr7WGYWft','admin','ak_d85a17fede9f4bdc','2023-12-07 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$.IM/NW3V1IsXQ4r83bdsMN6K5Nao33loKkwcnQsubckKX8ctTq/bL','user','ak_3a5f7e475b582a7a','2023-06-18 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$ijSrv893Qpw12O4yaH0ebxV7koWOkH8GGHAW8CAc7v9nFUX9HJ.F8','user','ak_01ff12653862f74d','2023-09-16 10:05: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=48938;

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

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


