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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$ZaSpzazidf.XXt9JX5EZU4wcEcq9u.1FJH.dIL2TgKFDs0YwRN5iS','admin','ak_db7ddb69b9e6f119','2023-05-24 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$Utt0VUg/w30/PDGGAqNjTvHePC4z54OIMLhAxNwgoBZSWJ9FhTkxi','user','ak_991185bf8217c21c','2023-08-14 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$OUNISxQ1GKNOVsws6ILdxrjZBP/pMjegcOlwYBcq1nO4rUvpki7dV','user','ak_30ea616006743305','2023-03-09 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$WShzkrFvkT1yXGrNhVpbFL3yM.G2ffKK1sR6qaM63YqfjgDh3CP1E','admin','ak_5c407cbb232c7a3d','2023-07-19 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$H5AZFsgUa/X7CxdYYnEQi0HNNjBAvJgIqd5BZeWORPfeyW/R6pFTA','user','ak_155e74e62c131c3d','2023-10-26 10:21:00',NULL);

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

--
-- Dumping data for table `orders`
--


