-- Host: db-master-6.internal    Database: ecommerce


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

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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$cGownResI86wHBcBgIEtgyoPELYfEIg4tZrYsE9NIjVXGBX8WtTBs','user','ak_78b9539f093b2d91','2023-06-01 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$D7Zw47zXKr3g5Kw1/GEea2i0syyTxx.l0iAm.aLuLeMrAXWqugJVd','user','ak_0643da3a113c8ffb','2023-06-04 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$KNO3Tj5BIw2dK2cLeDzlqf8z4FGqjetXlyRvAhVJTmw30wpwEs8p2','user','ak_e1a008164e7f603b','2023-11-21 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$/lt35N1VAjMb2q/v3TANWUJ4koH1zhWVUuEb8wgpWJSVsA15hYE3e','admin','ak_34ab1536e5bae275','2023-07-01 10:14: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=9483;

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


