-- Host: db-master-4.internal    Database: customers


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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$rxprI..9MFi5KvfEpiQgOykPYwhD3q8oT/jXwaNCZAnpFgVAx7Tvh','user','ak_df18423190818c0d','2023-11-04 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$j.L1TOyR7sFKzlLbGpYA6AovMQHAHsBd6ML/hwQqhsE48Fg9qnqNE','admin','ak_a0da564cb6cda7a4','2023-07-15 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$CdiEpNKf3obuG3sv.glR6ZEbxV7QoV2jZEYSIDZazEqW.cVkSV/2s','admin','ak_e6e24633515a54a1','2023-01-05 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$aktOiAHJ5DDsf3qF7XTIwV3BP5LloVEMbKUYL6Mx5pR2Nnrg8YnU8','admin','ak_8939fcdb42ac7e18','2023-06-10 10:23:00',NULL);

