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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$xMgTsjqGbi/ZVuuCXpozfwBFz/1VPgw5D1T2FotgjyEPrV..C6ZjW','user','ak_08960f1dc476b9bf','2023-01-17 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$8Vb2n1FBfyq6heCxIF/SJBDKa/X.lp/a0tepfL1Cs5pO37FNmLnrA','user','ak_018cd293170e7a57','2023-09-08 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$3HxwpXs9qgroPugQP32niTo8FFdIj8XFjVs7lPWSS9VuEKzdLQSRh','user','ak_01b5ffbac7266124','2023-07-07 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$U6U4eA7k0imb.j4rliq4xPelnstkbcnYXnO4mPGBTwQ0p.Ka23NQR','user','ak_7c112b55e8de8fb7','2023-02-22 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$LSNUKEHReYheyoAJ6c7zqHwYgHqWKDiRJ6eLgDXKkmrHPBBlXbJtH','admin','ak_5f73192372663aef','2023-08-08 10:08:00',NULL);

