-- Host: db-master-6.internal    Database: webapp_db


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

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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$YZ/J7SMbj5oLtB/ESMJEt3TsnmurLP41O8slIzkxyTuQc4yVxe8au','user','ak_5a043f1590f0f6a1','2023-03-06 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$ASviZoRHTUkmiq9Uho2XHFuhcOXye.qHzWeW1vwN1GDrMWggwVWdP','admin','ak_23039553df7b9c86','2023-10-20 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$mg8/Y7nl5vQdXspFZVUgg9Yf3xkPuCKzVA13Wm7Lcu1cPeGkErSVN','user','ak_cb0a5bd2c1d2cf49','2023-03-24 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$u5ZkMoaIzUcQbPg5lc1O2bxrugT47HiqEfA32JXo0j4dSYcUPVjtR','admin','ak_e4f08a2d4559ac08','2023-08-25 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$IbQWH4d/aHmJkGkMMJaHtHum8sOOkGPUc8vbiJ0TxyX.sHemfgb6u','admin','ak_3c3c54e97576eacd','2023-11-18 10:01: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=30625;

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


