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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$yDP8.4UsRcs.QuekT98pFC.VvTG9xpqFMX6K2lRTH3JHFYg7Ggtgr','user','ak_4568cbd72a274158','2023-10-12 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$D.0FIWMUNTVTdDYusflnfGP6er2UGRm/BdDzfQrFJj6YZM9cuCmWc','user','ak_65e539456f0845ca','2023-10-21 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$N5T2J5rssPgpf.LAe988WgKqx22g4wEGBnpN6X8b5Zu5zVhkTctC7','admin','ak_f1a06788f5ca0a2f','2023-10-01 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$vnxO.PGVOXY4u5dT2xpOeDRjjlM2XIItPuaNZbH6UH29iFQX3OYix','user','ak_3e19d27927f7a78b','2023-10-25 10:21:00',NULL);

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

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


