-- Host: db-master-4.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=17607;

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$/Jx0yQ1EM1vkzfFrD/Qo0Go.dhWeXK5STl078DylHsJK240gdrwW4','user','ak_1c68e2de8028758e','2023-11-25 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$YBypETgxhkgddV8WPc4F2VbbPOFdxjO92ppYV2Urw6ThU9YFaXWN2','user','ak_4a76a24590577dc2','2023-10-26 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$F5I4Rk3EL2fHfZ6CL1WQQWu.l17HAkNdM/Tim1KWei40mxFY5Jyos','user','ak_67595ee7a249342e','2023-12-01 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$n/8FMQ3zAFJDXhxxNrI2RDxYhv2rIAF3jty2Wa7rqwEY5xRz3Oixz','user','ak_bfad3a6e422d9917','2023-12-03 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$wXmurJbRrDDSlfJLey5BgRTPN30aw5.y1C2c94r1a/WFEZxv1cyio','user','ak_4866f9612a1d989c','2023-04-24 10:13:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@company.com','$2b$12$oiLTxqd4kpU7UZCBfFIJUYt5J.T72cwjB8d5XVT5y.MkNQhv.b0AK','user','ak_66563cb134b541b0','2023-10-12 10:15:00',NULL);

