-- Host: db-master-3.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=1615;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$ZxBMtkrtJ3x/F6GwjAvmjUfH09GULOMR/w.ojLiLdliE6yzZgQDBB','user','ak_ca8acfcc83a35bfb','2023-03-10 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$rsDx4e133lDnjv/tEEBkAIbuQqxZgYOAo2hyAOZ.ky8lM1bK913kV','user','ak_c73d5bd5f3e76cf2','2023-12-16 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$vEazbt4r07n4uXVp0mepOAlEmNEa0qAeUNVVnOTdARuYl8xLGBhwf','admin','ak_4c483f1c51d79dfb','2023-11-05 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$nKbktUod3CbWNB7KXJYThKSxs2am2Lr.4ugANv1xDd1SZKQZq33ga','admin','ak_7ddf74951990d945','2023-08-06 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$W.SmLXbQFGiBZZHmXQ/OG1GmU.qS7bD.YB4UgjPt4Qj4puq.m4F6F','admin','ak_3a9b1bad1a421923','2023-06-01 10:04:00',NULL);

