-- Host: db-master-8.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=7656;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$NArPMdgN73JezTSFAqfeD.JS1XiJhbRfRHO6NnbcHD38BtatbYgBM','admin','ak_ad1c4c6872831184','2023-08-26 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$SEIjU1Qr7BsHCYQL4TD2/bUr.Uv7.MIruEneM3r.3nTB6PiEU7RFp','user','ak_f1a354b2a2ac9e91','2023-09-21 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$FQ0to5o9BZ/CpP.Juzj.rwQTLkoSAlfw2Hc6RLsUhNTqKy54p.p.2','user','ak_cc6723798ba57486','2023-12-02 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$ZHf/eRNZi7xKkA7puJzyRahCCDuXJXUl9pBLI9.L8bnP6OX7ALjIS','user','ak_3f9dff7ee8d04587','2023-08-14 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$gmdGT2YXdf5kf/PUv8cVdKYdaGPo5WcE.ytrzwqW8XfOHDybBpCvK','user','ak_e69e3df1c20837c8','2023-05-20 10:06:00',NULL);

