-- Host: db-master-3.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=16267;

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$7RV1YSKEKqkzF9k2/evGci3ObjP5DUq/j/6norCK6QxmScbeq6zUj','user','ak_4bd7aa533bfed7ba','2023-02-10 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$gtVNvmOVvor1HSdkwmh0FaPtJrEkJqE9RvA3llpcvRbPijPoFxOXG','admin','ak_f1c1a5297947eea3','2023-11-19 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$tIzt1UIrxppxFEH0qgURq9CVfwRSi8477NWq3zmsf15N5UMzo.khh','admin','ak_0f28812a44cba7d7','2023-12-08 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$CsYxLVherwxNwbDjcP/loD9uKDwJujxlkYv6lX/KfSMUApTbv0xAF','admin','ak_d12b2fef6a8f5e30','2023-09-20 10:12: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=14544;

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

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


