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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$PRq3eiKqTJUhVaPluZkGUq3vXyzS9m/WjwR2yiuFEvs.Ztk0JaLaZ','user','ak_6ea08bbe0cbeff93','2023-07-05 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$68.iy2HT0tGG6oZzI1ExYi1e0Dk2dGWcGukWVNK3Egb76HVgrWUKt','admin','ak_532c46e6fe0d84c9','2023-12-15 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$5qyACExoPns8j1B605sfJtbC0ZslXabxYgT/xw7NsmFO5R.wFSwh/','admin','ak_ea3481036645aaf9','2023-02-13 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$CsZpoWsu0HIL7jjgPT43L.SVRwNxShOCz8GA5fjpF.YE5T4J85G8U','user','ak_97cd4e3c385700d5','2023-03-19 10:03: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=16327;

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

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


