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

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


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$5RU0rZ1L4yoppFnjPvcPIngEjIBhP6I2EwMX9AzGc.CVNTJb7RUHN','user','ak_58383258226c7aed','2023-08-15 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$RWHLS343uQVZCjCDXs79OD2RprRqTrCg5BL2FixXffBqnOcGZvu27','user','ak_f8dfca84ad4053b3','2023-01-06 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$F.M3.G7zSDvJTH7LHntQxzC1Ri7ViMrUbiW.Q8j9f1Cyewjeocjpx','admin','ak_1a3c6c0312b1a46d','2023-01-04 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$ocDgjMHTBZUQCYbutegwyZ2r8BM5zBuqUS8HPbY8X1xLGcQCk3aix','admin','ak_407177fa6fbad311','2023-11-27 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$Drz0wJjn4ymjm4UKlmnv.MqITH7DlzWfeLnbCWmFXOZ4K1Hf5Zwvm','admin','ak_fe277734a140bf8e','2023-07-12 10:15:00',NULL);
INSERT INTO `users` VALUES (6,'admin@example.org','$2b$12$dET46Olr4f3uhLuN0PfL0g6Lw3.VgjpGXd.0VO/Z8cNr566PNUnrR','user','ak_b9d396442c5a07f0','2023-05-14 10:05:00',NULL);

--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=21034;

--
-- Dumping data for table `payments`
--


