-- Host: db-master-2.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=50551;

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$8QEYvjUqblEAbRAfotQFdbmPqbU7Wqvjktt1998Mfju29ItCiU.tf','user','ak_bff700e6cb36f854','2023-04-27 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$oORLz/8NdYZkbZ/zdhuuRdg78//vKZjKMpvstI2UJf17EnkGxWpoE','admin','ak_679605db9f2ac55f','2023-02-13 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$d8s1w6tbn.1n0sy9GCtQNB/dlsslNNFH97A6/tro5LZ.86bWS0PFf','admin','ak_12354d78e405ffff','2023-10-02 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$Kc5Y1e7GO8madTMbbGwuHaIqGnJfWUStLRIXIXPUrdUkuyGLtKO/y','admin','ak_95a477bf4eff7c92','2023-04-12 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$k2d2ia0CnSjB1SiHuMSja5cR31/reo/JkHUp5vlJ8CcIHSpxI0Fv6','admin','ak_7ce5e3994ba25f8d','2023-02-19 10:14: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=30337;

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


