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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$w9XHgGgWbXX2czlHFUJ0htqACRoOTRdAPR1ILKncQcnLCM4AG317I','admin','ak_cc7ca492bcd5c1d1','2023-10-08 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$R7ZOIXFJHwJhOZjUpnjct9aygkIipiI8STUYYhoOH2tJ2JVWN4DM5','user','ak_af265e3586d21161','2023-09-22 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$TUSMVtXO/.bYHdgt4Pt4lFl8xoyRKETaXj7qY0A8N37rXYHqvPLkW','user','ak_02c3d58ab9156aec','2023-05-09 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$vqJsZn2W/MJWfgwjvXIxiIFAUDRj3/Md.qEzJuJRCnhrciRM/URTW','user','ak_b14510441562781a','2023-07-06 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$6Ff9XRIDAwBllZiOgBTGt/0VY0GgqzMahZKieE8llLbDxc2HsuIWI','user','ak_880be6f88ac7ac4a','2023-06-14 10:06:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@example.org','$2b$12$b0VOKNx9o7SxufXcIQ5nG60hz9jBhzX1yMfCEPvw6rrozj34cHKVh','user','ak_284037407cd1460a','2023-08-22 10:00: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=1189;

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


