-- Host: db-master-3.internal    Database: main_app


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=1695;

--
-- Dumping data for table `orders`
--


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$y4RhV7DBlP5DB2GZOnaJaZu9QcLtZVlAEhLzfzXF4yzOPGDmCXy1l','admin','ak_0110775eca5fb7b2','2023-05-13 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$cHV5fkJNMILmjTAOOP8fbx81Z9iVnl.TldszAuNuH1BdPkI41/O3U','user','ak_fa91222f32a5876b','2023-12-13 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$cfb7aSZerRzZscLSWd7YhRZL51iucSQVwfjz2v72cw.cfsyQNTqJW','admin','ak_8c63c70c814ab010','2023-10-04 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$Mo2xtKudMmLlpqpRqufaBxaeb1.AFRkeYC2mxmm9QQWQ4o8gZzur6','user','ak_6107c07dfde51fc1','2023-03-17 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$CWeBbsdWZ5XxGuU5WePNwW9bg1ypIpYOZPnzxc/gs5gB4zVC0wDqy','user','ak_4b294f2cedb3227c','2023-07-10 10:09:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@corp.net','$2b$12$wMRtpLfQohPRzKvPLSUvTVrGOBGZmHYbNSIXtD2nHiucEJo/Zacdy','admin','ak_cecb8491376934f3','2023-06-11 10:20:00',NULL);
INSERT INTO `users` VALUES (7,'admin@corp.net','$2b$12$Vm2A4WI/XAOkEQoxBt20bbW4zG2cMwSZdUm/7664rJsM3krLTjkP0','user','ak_84e32d35b1adaece','2023-06-23 10:13:00',NULL);

