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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$44MiU4RcIdTrScwb6/yWexwGCo477QPQ2wYNvDie/EP7P00wZ6ut8','user','ak_200088dcbbab90c2','2023-09-22 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$2568PkF0d40O.8Hq28wy6EJkccCbM9amCsgm5tpESIUVzHc4YdYNo','user','ak_b028bb29e9c0846c','2023-02-16 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$rEAPr8gBO2XPwBgum9IqMq6PNmhat18QYhouFC0zp5SpcdG1hfCPw','user','ak_b83fc0ca3e96f6bf','2023-09-19 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$1TNa6ueUBC3ZwKQTstmyRvq90LsDTefEuyEOq674qMqOCGpzSEC1V','user','ak_82d3756f57dece3e','2023-06-24 10:20:00',NULL);

