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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$JPMh7SC57FL8d2evWKbzy8sSbzCVCO.EJ06iSwLei6oLd68A3.kj4','admin','ak_76aed47e44b414f1','2023-08-01 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$UAd7lXmBDq6RdrG9xnzMucEQBBSf0iFWEJWqOHETxIx9Znx4LeADz','admin','ak_22f08d13d794ff9f','2023-08-28 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$uNv9GOeYrlaaJ9ND5gb2/FiCp3fTf5/.biOqaUXGhzyZWjnlSAWY6','user','ak_55314c5ca9463868','2023-06-22 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$SKklEeDEacKplTQFIp2mmvJ6az5eZRZHFHNMGDoK5omYLj.VbZ4Gb','admin','ak_770c51528449a5ae','2023-04-26 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$DTzvhTW4dKZF477UGXiBqkctB4xDTxDflypWiqXbrv32/hRRgAe8M','user','ak_f6f6b0e83738e69f','2023-06-24 10:15:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@internal.io','$2b$12$rWfAHW.98/IqlNUrN0.VQcYE3soUSp41pjWoE4h7d6UvYpKFg0tR5','admin','ak_288de1b6efba785d','2023-11-24 10:19: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=35406;

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

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


