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


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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$PIn3HNYCq.5Oii/CBvypqMSOYjsHGnG25R84h99ySQFxY1h/AeqiB','user','ak_51e5697150398c33','2023-03-27 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$2LCoJj13/7BhLpAulgH6p4HzHi8TQnsjwc0QFdlSJwIOEX68BfKfC','admin','ak_24780c9e7a8b0675','2023-01-15 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$837imMFXzfo2NWOSM3spB0a5sSnTqBZxbuNi30igbfizcdDlAcXic','user','ak_0bfa1d265c8f6593','2023-10-24 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$4zMcFseT3B/bL8CEbDmXApydpXXR.BjJeBULeOcnyWp7nRFrBwNno','admin','ak_f4d51c81d7ce909d','2023-08-14 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$EvDWWIO8GEpGi6u5XqmTCmjNV2wNW9ZSM6zPsfkor63IPICs3eD9R','admin','ak_7e8dbd8933e14299','2023-05-26 10:16: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=49831;

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


