-- Host: db-master-6.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=8963;

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$8wp2wXgRIiCDLQB5AaAdzQ20Imj7cW6eDTEpSLPb1IVByqfKEyDbT','admin','ak_f071c09e7312a1b9','2023-08-21 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$sM.0PRV.a0DPb9Uzs/pAWorr3N4MwpGxJ4eOjGnpL6Hf0iaKBD4Aw','admin','ak_5b761316ebb12bc1','2023-09-26 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$2IwypPgXpPOFvGZRC/M22Bgph118Nn9qlONJyImZu2bATt8rAkNaI','user','ak_0f275063ba9a8b45','2023-07-20 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$6UaGsypYcfNK3P2NtPrGxw3iRKXe8SOHNgl7TJjsBNawVJwclKjAE','admin','ak_31b3743b0f490503','2023-08-07 10:18: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=38937;

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


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

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


