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


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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$F4jd1Q0Sv1uFAmIk43mmWrbuXFFcQKx1Ul9w0WoX6uecR7blpC20U','user','ak_733ba40320acf4dc','2023-08-18 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$i65InT/X7Mjwb1OJoSLipkaxf8fQ/WJi9u.NXE6xahce35oAN6KD5','user','ak_9f4115d7cf9d4d61','2023-09-04 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$wQTsu3NAdZZ403F4SBWo5XC36t99Al/ZRI4YocskJhLfHcmEgXKQQ','admin','ak_fe50baeed582a1a6','2023-12-17 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$P4ws0vRVYoHpQUomIppVPOo7amB4pngehm8Du.7PA6rL9URL2jxwC','user','ak_3e85c22f2887837e','2023-08-28 10:14: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=4361;

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

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


