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

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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$7lf7OZZSz00Xz8NzIi65zd0k1apBV7RsDS/.pJQ/1ugtf3lER4.8.','admin','ak_62fb508a6a28ccf3','2023-03-09 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$9tsZh6GcdBuPPmxOzUDtqkzVMOqoM3xaCiARmV39HHzKrcn0X.cX2','user','ak_2491fe8fb633b0d9','2023-03-14 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$jyMxDxHo1TkbJBGlMfUr8vmXxafzjBZ8oZtxZ7kr8FjbWFFQNFRob','admin','ak_def4206e1ba23de9','2023-04-17 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$SEnNPvQWy2FqlbRivXZEGXQEoIj.zpV3TpRbru12ScriB0ZVrWeZu','user','ak_3a6ebfef32bb3118','2023-07-04 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$LUuJ5CC2vhBW.g4ZcC6XPSNkZvEB/QNTp8HPmTtE5vp1Ccux6vTTd','user','ak_be543bade7f6fe46','2023-07-06 10:17:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@example.org','$2b$12$UXAbhKl459NjcfQEZ.J6aAZfdpYRTNfLLDbjSohRlqb6QDsURSpxR','user','ak_ce9ded4862748ee5','2023-11-25 10:11: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=38734;

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


