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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$j6kRw3zE28x..khGEdMbuufdNw7.CWOl3jYxncxkaEZ68Kqnu8dIU','admin','ak_e5df806d49d15838','2023-02-11 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$ZY4JG7fMq78rOViNm6ppTOmdPpAzuqm5.8uGDHZqn3NkRxNPMjUYp','admin','ak_8f870f49f84118c8','2023-06-20 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$9jTqh.XWWE7ncNVNi25ZLzRr/EK9iyNC1a2pFbFVKN3NGnrq5y0NG','user','ak_5d81249142d61f0a','2023-04-01 10:07: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=44664;

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


