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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$fAOsN4icqFqpyeF2VMX9XnP9Q910RvqJW74H7qNLRyoNQxYPMC4l0','user','ak_e0dc698d3ddf41c4','2023-11-08 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$gDycHvB7XRF4bbGvDkLHMKZuW3GCPVSRBc1VyRV5.DHQkQpRFvwqA','user','ak_9ab02e6dca30fb04','2023-12-06 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$gPH8/3YFGMqPekvPKtqEVPVrHkMxLCejhlyOEVg349PSnSH0nEsok','user','ak_cfeea22dec359bfe','2023-09-22 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$ubGZbXOxmChymkihYKwWJ5OD2OVqfbZYUFSQs/PNyPtMKmbYVB9i9','user','ak_0bbd0552a21d9c89','2023-10-24 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$kzZ9aw6s3FqyMPd8lcez9wga1lL7G.xtkqGgtFgZKsrSzIfPQ137b','user','ak_ee93a6b6b1e932d2','2023-11-12 10:05:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@company.com','$2b$12$CGmn0peNDnllPgNpNkGy.w4MulBoNEx5JIjt6DBzTY.G9uxzCChS8','admin','ak_e118d3c38f7f0049','2023-09-07 10:17:00',NULL);

