-- Host: db-master-5.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=2586;

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$xcv1owVzlhV8d44kxizS9IY3vm.I31oAi/l9B8ps1I9lqlg6P6mWY','user','ak_05a1a0afbbb933eb','2023-08-14 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$boD/zyUE9TC3z1ADp9m1S85ATpfFVbgFI4QiChRb1hJPkn76Kw1Rn','user','ak_5b1d644de86f7d3c','2023-02-09 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$bukThFwXt5HsTDxQow1Ins3l1O.ENA//SZTaaoG.hrrhtTlxkX3QE','user','ak_62d49082a6b1a062','2023-05-17 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$lkT/IqkHbsnN88cJH843RGp.Eqr6PP1K/KsTIF/l6KHVirb9c9gWC','user','ak_39b99b8c24274e6b','2023-01-25 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$cM7ywnX6NQbjRUBgk/emj/6V3pwCzcr2IaSUxhsHSOpvtYU7R12ne','user','ak_2c1744d23ac1b12f','2023-02-13 10:20:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=43560;

--
-- Dumping data for table `products`
--


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

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


