-- Host: db-master-0.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=47148;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$XCzG9soUlOtmL8tTt0KCBaoh/AdyxxdazmXYDQkGD3NIvy1Qnl8hX','user','ak_0b4609defb7febd2','2023-06-06 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$UCbHRhNbXz.rX4fb/rQa3o2yf1L.DDRlpaPp.XlUuErMYxpKKs.Gp','admin','ak_966f7dec2f3ab5fd','2023-12-06 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$bJMmplEZsyIIKdEa81KKWkMwaD8VJFhErD.uDzOohVDJNiVLT.WjB','user','ak_388aca299b199075','2023-11-23 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$uwTuDWnh4QLLCmBZRFjrvbZ73S1MbJcC.EqoWruqzVf35GpTVLu5H','user','ak_b3c82030413f72c1','2023-08-02 10:17: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=30212;

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


