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

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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$ImMBmcMB46.DZllVXxIEjQ9dKcKR.VPRJr55ZOsSYcic6T68W6vTR','user','ak_80851c384e73d213','2023-05-07 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$fAoU37rvUWzkdBv1MLcgGmMHEjVClDTRD9.VGeyWE2URQTxsi10ux','admin','ak_182792d4fcd3ebaf','2023-01-12 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$e5CHs10lYS3m8KZ./Exry62iq.NXXaTNVjZsJo1m0CQc0W/RuR6cN','user','ak_2e1538820811261c','2023-11-08 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$B.kv9qSu5rs0f0XNAH9qQiZpH3CwlesIik99LBiz77lyOuhbXW1VL','user','ak_7f5ae14a7831ed8f','2023-09-28 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@internal.io','$2b$12$FM9T3R3fmh3O3ZfRj3xJ0b.2ca7aWXhCGg/hRxKtYHNErQR9SUit0','admin','ak_df44fb3dbee0719e','2023-03-26 10:11:00',NULL);

