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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$jShAEomOE6M8gToyI67y.1SebAk8y5iNw.MSPc5b3SLdhT9Pg0l4j','user','ak_955e1b0f7bad3f1a','2023-05-13 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$fYejMtpaeLB54tLqsFQGm6JdYZh8dgCL6YM/4cJRyhG0xu8Mx5WPk','admin','ak_de0eb06a01d83e83','2023-02-17 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$aSHZlhx5vO9bxSu5W8SlfYj2d4QvZWBqcGnY5cHE.L73aj8w0SPul','user','ak_720c7e9bce748630','2023-04-26 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$wUFmjY2/3F3ROR4jYYaTIpvcxQV8IifyGNylSS/YiGydv6rnJlhMO','user','ak_ff05dcbdb4e2295d','2023-02-15 10:09:00',NULL);

