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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$KM5MLW/wOz0IDoK12Zlb7LdJq.ngJpPY5L9/PtiYPWgBWQ00X7vBv','user','ak_ba89f1a9419791bf','2023-07-08 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$QeP0qWCuG7N5Om5wmvfDK9WaKW9zLKL2IDpn0VopoDxcTt7FulqKy','user','ak_38339521e56aa196','2023-01-26 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$WPYJyNScB6SMncPJK1TUAEWlBBIAnaDSi1IeybSTjP5FaE81N2qmi','user','ak_0695f0f4afe29641','2023-06-02 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$S0sgGShip7pkkUdV7IT2bM4ctjFVW.pK6qYEAJoEtU.QNGRndRQM3','admin','ak_8ff9bd457ac645ff','2023-01-10 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$62BsxwkDcB0tCO.NVC8Uw3rrTRV/yP4rQGJUidcSrUkGzLR9VG5jv','user','ak_86b624dcb6a9bcbd','2023-06-09 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=11049;

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


