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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$9fOvUWVHY0rro9TrozUeMgeqEgZfYHRe2F37HMGpxstSDbuTInqyI','admin','ak_13c65e1375b318c6','2023-08-16 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$uISJkIOAQI5y9YlDmMVC8KwsS/FUn1plnB.FZI7.GfSnXmtlhZwZY','admin','ak_31168f052302e1d5','2023-11-02 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$qKg4dyLiXYzFnBBi7JgVn9A8QBo/KmKWorVCpJuCU7y5cjymOK6UE','user','ak_8e05bf239bb6cafc','2023-01-03 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$UlgJTxuCFFcXLWtF0dSiLAZqh0Hy9m9yfa8nkTv6TnlPSBhqMRbcK','user','ak_060583b611d2b69b','2023-06-10 10:04: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=14635;

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


