-- Host: db-master-9.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=35718;

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$p/W9UQVCJGtb9D2UnVgUvCCo3SjbmR3uzBX/r2sER8Uo98WCQJN5W','user','ak_ceecba7bac0b4a16','2023-10-28 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$8qubBSM.HFZsVeFd1xmQYtAu/cGj7DNP9qfuZ7ABag99XlU6LSj3t','user','ak_0c6b1c08c4429a87','2023-11-04 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$0SLydQRve5Z6mCSksIkNCZslaRp/dupg7d.Jw2S2WeRrLXElwCaKf','user','ak_bb2aa2e2cb1d19ac','2023-03-05 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$86ioEv1VGUnHA/8ex7DZ1kvChJCNsiYw9h266sN4Gs24KLXJdqgOq','user','ak_a22475717a06908c','2023-05-28 10:16: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=10773;

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


