-- Host: db-master-6.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=1154;

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$1jfIwCsx8MYmihPV.TziJOXxWCiaggqssop84Unx.ni4MWe0.Unff','user','ak_130ac8d5fbb3acb9','2023-01-13 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$izQnEOipnu32LIQ2dXg13MlFXfXjBPseaAyH6cfTUHFWx51.YAVq6','user','ak_a0aba7f05e321dd3','2023-07-02 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$VIEP5mfrBiCgBVJc46j1KJ3gzhWRpWvlO08Omyna2AqVor4lkUyQU','user','ak_16d863f2e9f87c6b','2023-08-08 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$xejstK.RqDIlMSuvBXBoN8jkfPybeDq6L7LJ3d057BIZ1RBotG/n7','admin','ak_6c56021a73c1a07b','2023-12-22 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$jv8KJqDOkBGmMXSAOsXA5HbhphzsSyRgil2cIba2YT.whxt..T4Y4','admin','ak_0b97d773064bd6a8','2023-10-23 10:21:00',NULL);

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

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


