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


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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$eOoKxWaAH5esGJx3pOfJYBqoc5uhnmKxQQFj8ABIX40kbZJbjHAo8','admin','ak_e2b2417b63412d6d','2023-10-22 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$aAuAw9RrdHRnXvtQTSeA/slTB4s8eVPV.AQ4dL3yNLMFv/0zToJZZ','user','ak_a923a2883decea6e','2023-03-08 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$alw4yqmtqX1VGrSA7ZZKIi.LVZT78qybb4V2Y0nZPW6.a1tdOfHPp','user','ak_e3b7f7178857749a','2023-11-09 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$zoNvhmpCcUfUwxBE5feNo5b3pizcd49nWzIBUH2i5eXhWb5Mojelr','user','ak_af4f5c41db8961c5','2023-09-23 10:03: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=40091;

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

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


