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


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

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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$MrSpxUIS/tY2X7jGGzRJvft5M.m5S2VEvNqlsMI7pvFy5BPzRFpuu','admin','ak_59557439a9e45ab0','2023-03-05 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$5zdaSVtKmaO/lSudF2NW3WvzrkDDKZXhQ.jOiV5g0N00X/mDcflnS','admin','ak_912f63a5b184ba1a','2023-04-27 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$uDND4mY6BKQLWz8G6O/XqqWrVScNjEYxHWIhRX2GMPmKJaNKtD2Kc','user','ak_0e9adc633e2acdc1','2023-09-14 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$TBMCHHS3IjyMdVlXcSGR46LULR.h4eIET8NGPJN9XTchAG17U7tgk','user','ak_9e40a668a1eeda85','2023-09-20 10:16:00',NULL);

