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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$jcNKKPTykwOWWizjpLdFoXV5IOFkQ4LyzB.7mM9Ebw0NsT4fbUWEt','user','ak_0cf0e86d981a29c6','2023-02-13 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$WtxE/PaqHaObsDH6Zs.D4AHa14t.9ZuUYXwml/z1OGHCFHH4Go1yc','user','ak_d874255cdfee83c3','2023-07-03 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$3AFukpH0yJ0tvKzJYxxheYmiV0hRW06OxNGl/ib7eILoMclQFobad','user','ak_8705dc5ac9aa5a67','2023-08-10 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$XSC7yfKPvZ5En5Her/fy6GMW8BTaFnsdc5dnMaKw08YSIb.noVKYb','admin','ak_d5eee25b8676d6aa','2023-12-14 10:22: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=42460;

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


