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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$xVs5YZ2vNplVA.Z5cHi5N9o/RKp6MNxKEey70IYmp5ge9/OLFncMh','user','ak_295b7f70a9054e07','2023-10-21 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$I4Mjqn6hPCanobtPMl0TonwWQ6OSkJgZmoQb5FJxO11Xt4sjOa1jb','user','ak_91c90da8b934167a','2023-07-03 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$gNXjPZzwHhMBNSBWKDJV5TH.xGDXPCYoGThEoPK0IMybi3a9sz1gw','user','ak_5baa9656f96838db','2023-08-06 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$DatdEZ5tsAs0S7TItDezhDCHbSNP1IdExquqff4JGgcsBZNm46je7','user','ak_7113b9fbf9e3add0','2023-06-23 10:07:00',NULL);

