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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$Xfmj/t8Zgn5pKRZrqaQarWLOgs5R5P6F5Ya9XRWrwGW1KISdpyxHC','admin','ak_835fd1a24689fc66','2023-06-25 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$5yDuhZu1jXG3hBbJC9WFYBKR8Ce6CARf7HLb.k7irqP4muqNXl1Be','admin','ak_d12856776c8a510c','2023-06-14 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$hJo5k.W34aAhY4ah9o24/VbGwUXnITxjQueyaOcZ3XJofQAZlo7N7','user','ak_2869a5859d673126','2023-07-13 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$Ngzg4T7roRrkrK2IOfsClba7VGuS6AHaiHk0rybSgZD3KC8r7eoz6','user','ak_e3e1e027a43f2862','2023-04-07 10:16:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=43873;

--
-- Dumping data for table `products`
--


