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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$2U2sNoIYXdRu1oBQmvWTGK7PJS7m3AAm3D2YUUzj.zpvAYbN177I8','user','ak_e8d183e3e335f1a9','2023-03-17 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$DMZ1DVkUvy544VuIaT61Ijt320ZqH8sYtrM7.6Ir0f3eTG2wxcWjN','admin','ak_a8cafd70058726e6','2023-02-10 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$GHVxze6XFLTJxS55dn5xglYutCaHrUkJBlCiqfcVO/QDPqdiA3Gwo','user','ak_c51e4dba9f1f89d7','2023-04-06 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$3My6x97zsmdbr7orOB2MQw25IfZgUhw8QdtaL5jv8QwCcYAy9QC5c','admin','ak_5f430640e1eb3738','2023-12-26 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$xsUJsfMsDq9JktwEtOQVCwGJzIt8NJrzQEOVAdJdcoD1iNt/7ZSBr','user','ak_5e18d2bebca9c415','2023-09-20 10:16:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@company.com','$2b$12$GOxAIYI9Vu5rbAABtjkx0fjCi2P90odOxGSG7meqVVUPnioroH4E0','user','ak_e823739393545b12','2023-04-11 10:01:00',NULL);
INSERT INTO `users` VALUES (7,'jane.smith@example.org','$2b$12$BNTUuPKy48xD7FjEhMbj1VI4abkh.eYWEIWteja8d2qyFGij98jlq','user','ak_f88b6f36b953233a','2023-12-17 10:17: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=35064;

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


