-- Host: db-master-6.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=48719;

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$LZCvFpbebEEljRUYyBeQTPNOcS1mPrcKMTWvCSwjqMC4FAGd24/Bt','admin','ak_ee8ab9f977531aed','2023-09-06 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$O501J9h3Bxud/sjIYjzA8gxkpT55n5Pd4i9b5Rp6eo/uqHYADZiBP','user','ak_07efde49d14a6d86','2023-03-03 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$QC8X6BSMB4ijvHKtSQVY9C87y6Vat0HB4EdnTRz5W0pyjHGEgjt.T','user','ak_731685f539fe07b7','2023-02-04 10:17:00',NULL);

