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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$nkFuQzOg.EUuyuUGNY5ybKAQVsOkY3mxpN6Ld0Mg2N4ubL93HUAON','user','ak_66150a0ba802e74f','2023-05-08 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$g/rGuBaD8.Wee3gZFgU0G2rLo7CcI1KHQ3bIQw7ghvEOloKN1j.jI','admin','ak_fa7e7b49be17b385','2023-08-26 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$PZybYp76px4mdV.L3Ck4VVnJ8MjkA5I.1ZFna39d.qhf5vH5FFyXv','admin','ak_2e1c09afeb9f4dc8','2023-03-18 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$X4XSGgjplxU96FxBQ50jtlAbwvOVns1SCUlmFRo25wSCK9HBmiM69','user','ak_a35c23f0f1ad3f87','2023-01-16 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$3ZaFaSgHb2pMnVU.jzxObq233xc6T1qsuvFPVDV7iKJUqy7TKj14i','user','ak_c2278fe9b04f0c16','2023-06-05 10:11:00',NULL);

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

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


