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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$DHQMZ.71LxjH23A4F1ueuD3990lODXH4mj6Knei6h8lp9ORHFfhxj','admin','ak_a5d2e4a3fe4b10d7','2023-08-11 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$nbhvQh91GfQZ9MfB.G4Hl9Iucj9leAaAxz/k2IRlxeG9EZTsGL5.7','user','ak_c48a270fdd8f06cc','2023-04-05 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$gE.L/jOoSBU389g8GH3N9ojmKLpSeqaC7eYyvZnDVCCBXecKpFcZX','user','ak_fe96694e6454cb6f','2023-12-16 10:20:00',NULL);

