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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$ixU8yneOXfmEOg7r66.AzuUJ4NGhpt4MF7Ifz3LRyj0T3MhFIjfOC','user','ak_ee82ac13ed97ecc0','2023-06-07 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$P4XRhehM1oxQy.5BUTWQ3KyzKT4nfQ8vQpkbVuyIyVgjD2aDZ1XF8','user','ak_e2e1b6c6930ee0cc','2023-08-20 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$mDPcKREjZoTfXKjg.3zIsLalUQzrpGutMbiJsnbjfDqcbm9t9xL7U','user','ak_8007d934bd62a532','2023-07-03 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$ROlLiOtWQPU4EOVwsqKKLsOrSZtAI3WrgmxqcRsg1wPSb0BANHZld','user','ak_fef86b474c00f68a','2023-01-28 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$ltVaXKw5OsB1hRaiLc/zzXe/eYaGwf2ZXUBMjBnw5U9IvMSDJEW6o','admin','ak_d997dc6e4eb9a274','2023-10-07 10:08:00',NULL);

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

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


