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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$M.VAO1Pr3WAVkEDEhDNFkkn3umVoqXe6A7XHQi.ICCPAu/K36jj9C','user','ak_167148b149826f0c','2023-12-28 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$bouA7fiXggd2wblg77Qv2HR374Ei1McyCsmoCs4wJl65AL1w8cbSo','admin','ak_725ccd100ccb747c','2023-11-21 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$sKA/7Fy9crGi/4Hic8W6qYHUTaTE3gJdgkI4ScLA3mV9IIc7ACJiT','user','ak_e754e45b1afca052','2023-10-14 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$O0qb3YA1Q00LWQ6XhZFK9VNDPRseF7wYTa8CSxjf5sjrWIQEC2tjf','admin','ak_bcde2b5c9a62f775','2023-01-26 10:20:00',NULL);

