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

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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=49424;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$OKxb6RYwsBBomyTOh9Zl3Jh3IpkSlRLE9PR7JWL4PWhYbyqPxXVsI','admin','ak_f4c1ab87e708bce5','2023-11-21 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$oMLljSUnhfZmMpwAv3EUc.YUhDlTqAOoHGPtyzcFLOaIZ7EPfdKpN','user','ak_f959b9c6d13259cc','2023-08-06 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$9as6mteb0IwKjXC0yVpbYswEBO2xPy7fYeeJPTE4i32U6tWbSjle3','admin','ak_469863bfae9b6bc8','2023-09-10 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$br0bR7aQj2LJ96avs2K50fGPsKJEsbBwhWWx/Th6sXhpO/0zcpIbS','user','ak_e8399f232097b456','2023-09-28 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$Q3rJKKwltx8XlILtDaV3epzy8cWtuUruSOQPg7m0/j7D27mFP4Hv7','user','ak_dadbfce493d8889d','2023-05-27 10:11:00',NULL);

