-- Host: db-master-8.internal    Database: production_db


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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$4GACv4zexVfIwM/2h2P9gE7MYbVIgGJ1G1LR057jxRvql..9BdTq/','user','ak_0a0ddb33a8b9362d','2023-12-25 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$fP7QUWVCVdSaizUvPT81iQKV8RvT7Y2cch0tV/UAgC9DE9PqjBehw','user','ak_6fc957d7cedc0924','2023-10-04 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$c2O4WCnhTibudcIpjWMTPDZoKe12g7kIchc00/IY8s6UQRHth2wf0','user','ak_33d1fdeef6145bde','2023-06-10 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$PThrjM1b1366DKbQSeyL5jzHk/D58WU7Nq.966zQrB2IMZUEqpqPY','admin','ak_9bc841fc9560355d','2023-12-14 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$Wv.uZ9b5Y6omsbyeOnx6GtIJRwWQOGAZ0Rfx.OFqEvPulAqhhrsP8','admin','ak_59dd5ce6c9c6fd33','2023-05-09 10:02:00',NULL);

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

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

--
-- Dumping data for table `payments`
--


