-- Host: db-master-0.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=13789;

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$7CMu31nuBCmkR1a0njYZO6Zz1oCw8dh9US2OzaOyuUtHJdcIPKcZx','user','ak_76d93b22e3065eb5','2023-02-05 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$YbRWdMRdbF97wMaWrCxOXVFYcma3oM6sf59JCYjWQQlcBr5amCyXu','user','ak_6f6117d8718c2a21','2023-07-18 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$5wQb5hmGgey22rZhGMKQMgC2U6VgZ.829bSxvLy8VMQd8jIcp5Il3','user','ak_28a45ecc27a4fcb0','2023-06-25 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$zFGPEZQjsb6iXrgLNJtWCUzKOyxaEoT2x0nbfXYxpfUHwtLumGqMQ','user','ak_267246e205c414a5','2023-05-27 10:07: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=25228;

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


