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


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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$K5uAdrpzQobObUaPMbNNaxxqv59P/NmJHUEl73Wh.xBv9RBZ7zvQp','user','ak_a20ba3ad3c1c1d09','2023-08-08 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$9DRyOw22JkI7zpERmgaOBzLKDQ/EJpt3nHrcXYkpCNpHL25Jectz.','user','ak_381d7665dc81a142','2023-09-22 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$Xyp695uL7loQzUyNWLfDah2mKl8.XsdVKQnnNSqV52FYZzm2U91y2','user','ak_c69a4a5238cb6e23','2023-07-18 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$5LqiKaxD2BuAlgxg9YTAw18vGbs2y25Vlsp7mczNlBp.ZhQoVH6tU','user','ak_8628743d0882f7f5','2023-11-03 10:01: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=48159;

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


