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


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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$kzeg5GFnKmJsXzkixflqwW.0WcHpPrpQVwP7KLFY9hx4fVTxwvBKC','user','ak_49c3fe957f9affa4','2023-10-24 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$gPvMtVf7UJVdpWUHjDkqP1gVdYlDBtQjcIC2Hznoe.enIFtkSPMnx','user','ak_5918cda6cd2b5e0a','2023-05-06 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$A8glfqX65.dFyv7kDzO9zIfdoX6L9cNXf8ra39pwZC6AIn69hRIkz','user','ak_e1be221237256f5b','2023-09-01 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$B9uZdq7HpOETxJej6tOu3nFIjhQ4OKpoMyq.Z2wR9CtCX.UtnqtmQ','user','ak_963c8cd8593da813','2023-03-26 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$IdhQRniMcpuU0w9GUF7I/Rhsh3IZTDzpLLSO7jLvujenwHEmhL6J1','user','ak_acfe2c442c3cab47','2023-05-01 10:13:00',NULL);

