-- Host: db-master-5.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=26031;

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$3vrYJB1Bnm.1SWU2cBhJdwo0GLV2T.diBCtkKtgEUOhbDaorH0Bmj','admin','ak_3181416727340f54','2023-05-21 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$DZeFixL4MtXHJOPYFfEiJMXMxPb7E5EDJ0QryG5q5s/Waiqq5GLdN','user','ak_e9efae49a621ca30','2023-05-18 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$fZRDvQN.IkJjFX7AGzWXcBdRvqAxwU4di7gDZihhD/YAq3qjZepbf','admin','ak_0b71a73e5e3aa15a','2023-11-20 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$zeHOOrW8hXGmh7H30YIgLlgzQvhafwC1slreO4zZsMjyHNVdRQmfQ','admin','ak_dd8a0a5547684506','2023-08-03 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$vEbb.hXfl19EGrX9fg8MCjHlrbbpgOdtVFtA05TEMBkX0sAGGZM6L','user','ak_ed2c10e7ad52254f','2023-06-25 10:04: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=15708;

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


