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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$sn2iljRUpFYhxWRJWGNbu3fLZ3AMyHkdPdL1K7hkA13BjoxJEoaoX','user','ak_4d5a21e2a6e57ccb','2023-03-23 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$Hj4x/q0IUMlE/7yftutQPrLIiUMQ8LZq2R.J7usaSlS6.k1G9Reml','admin','ak_d7c0efbd5e75750a','2023-04-16 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$uCzs8pW9A1RnWSCjU53UAZYHK/EFWSBiUvSGGByDbZ5MYqpaEhw0S','user','ak_b1d8dcb45c92a3b0','2023-06-01 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$IoPimuK4WbcWf9Hi9OaJr9XMP/qgGthK24Pforz56sEZwoNlwamCB','user','ak_f72ed87b1d8c9eee','2023-06-13 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$ezmpyMbwD7m9yUK0SwCe/fcXV2ynRLY9TtrL3nOa473p8/gh3l219','admin','ak_22418cca7c934383','2023-07-03 10:06:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@example.org','$2b$12$w/7zVKUDQI4JaJ/YaYUO2DzisIRIBFaXZ38S7EPKs616wd8Ikr3Kl','user','ak_7816e4ec81c19524','2023-07-25 10:21:00',NULL);

