-- Host: db-master-2.internal    Database: webapp_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=14183;

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$hqtUEgLk8FHm3vIrI1nPkyRgrh/KdnsL2abxL.S19g3qj3izW1YAd','admin','ak_9ad9345c5452e5d7','2023-02-24 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$aYOmW47/9gKfILEx.7HEfcGWiniU/8f66FudDNvuuLHOSx9hsX.Yk','user','ak_f4632b8c792dc2a2','2023-09-21 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$shKU4PU2ZXmtAkPIQNavR5Vrj/76reJkKdq5w6yD.nRweLkZmyy/h','user','ak_ca39c551bd5e5164','2023-02-11 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$nLu03rZYKR1aQhIp/83fc5.EA06AcBkToCHQ3h17hGnk5b7QivkG4','user','ak_b020f6dbb9ada349','2023-02-01 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$MgUl9EzMSk7H770gT64wKOXCWFV5Gd7/81d66ONAeSCCW0AATNiHT','user','ak_06eaab20c77538c1','2023-05-19 10:21:00',NULL);

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

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


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

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


