-- Host: db-master-1.internal    Database: webapp_db


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

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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$R2dhKHXk6KnL.uovGMMHfQy5KGAkbTxXlNjJ04xQlwVVrXCdsS7ig','admin','ak_20fd13d66e29d052','2023-02-16 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$WDerRdwIYZyR2A/hzHFG9gnZTDliXERsCunrPKD6KE5KyqkEm4GWv','user','ak_5fa72e583e5c1ee0','2023-01-25 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$pcP7C8eqlcePSCsUvLLeV5oPNKp.iymCqp5l6g.XUvgDq6Zcd5pcz','user','ak_f166ed18d11a6f84','2023-02-01 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$VFVkbkPGl3gmVBFqv8ipfBkSjEg7SZ/YSdA.xb.zM6S1ILV8TbqWG','user','ak_2e7390344099ea2b','2023-01-25 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$tw8nK9cVS1nq/q3ihzxSSUN2dMBIs71kBBh6CFMg4GJFZUK7pv.uO','admin','ak_53176c4d8e5a025b','2023-08-17 10:18: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=46242;

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


