-- Host: db-master-1.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=19423;

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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$.o91sfaNbqACT12UFYIP3hN2GC20HsDkmncrSetL/virumIvQ.Cxp','admin','ak_9b7a87b06bf566d2','2023-06-25 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$hLvDLxC5nxQELexcenz.muzye5nZx.t8UWAusNEC2IdnNds.HONKd','user','ak_426843df97b0d9c1','2023-12-07 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$lH4Fca1m6eVK.mzjf51U/syWkT931pyxClYe5au37Dr.pWz2S1V4h','user','ak_bdc6ac9d8ef0b1f6','2023-04-20 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$EZb4Koh7ZjfjkT7HYJqCXJPt3i/uu7rMlUDVlKtRYXrGdr9PB64zz','user','ak_12507f6e8d8e5e31','2023-11-21 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$wSFqupz7Sqe7y3z13EW.Q7Ap60fwoeI.4LgD2FRXg545e77Zqypkq','user','ak_81e7d4b006d6062f','2023-09-08 10:08:00',NULL);

