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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$TVzvLbawRXfLZbRt/dH9d3/h9xleYp1ApzCgy2CDgicngoEF139It','user','ak_a6848501c5eef7e1','2023-04-24 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$q0j3JcImebHs8p/7qrb2Pl3yVAxoxU3uqXLKQFbEGfgRryS64xxU5','admin','ak_51a5b8df5cbcb080','2023-08-02 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$XborN3Me/XH4inYlVV5hPd7UkXkkH19sqVYte8l0g.ukLU1cUKiNA','admin','ak_76921b9e24219c88','2023-11-28 10:16:00',NULL);

