-- Host: db-master-9.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=47435;

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$/t0vp3Ho0W6s.yinFIGgkXpYnpoCvtNPftHnQNvzdrpWAuuOh/eJx','user','ak_5c094a866671c696','2023-10-11 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$Npz5CwXNp7XzVPLM3PnJjnSwLskqO1o3z90vmqjYEmKJIUyDZ6zEQ','admin','ak_151f1f1180dc7f3b','2023-01-17 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$k2bkcSFk0kEZR5gUS/rzaFsE92KAQtuFKuLFP9LNcwa6eg1EhIDpV','user','ak_a7367ca98b8590de','2023-03-22 10:14:00',NULL);

