-- Host: db-master-5.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=10323;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$6gVX4p3zgwj9JIOpZKKlQ3VQyvDIi7FlE/bO/9.Bjdc.x2zEqrnaN','admin','ak_8e7533d5bc8f4426','2023-07-15 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$Jtwt7DHzXy.Cf6bYRtrZaXmTIhbP/WjAvLteSxib42OBKTbKkvq2V','admin','ak_9d2a58a96134c869','2023-10-13 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$Cuk/nMyODOd.BNn.AwOJVDI8gLpq0EhNqLxXm/kleWDx4xRQDtFgN','user','ak_7c040ab450ff952d','2023-02-05 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$AGxfL2uEJUs9F0Pj2ebkwq8wbUMbLZYohPrhWgha0sr4ohFoRLAU1','user','ak_ad3af828437d295b','2023-09-16 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$ugE2L1t8YDCx9jGvWSuALNzoQdR71IZHKJmokADldGUYFxRZSxv2M','admin','ak_3e67acfc16feb3f8','2023-09-22 10:11:00',NULL);

