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

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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$NvddIcXi.HAz9N8dOGfFbse84jgWs9MKmz62d/18diODrDrDjJSX4','user','ak_ea8b33490d8ce13d','2023-01-20 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$j6l8dGLVtnV.BY0a7ZVkKJQgX0vj8Rw0Lv7KXCUYyWvbnFQITl9Gj','admin','ak_1f5653095e31130a','2023-02-01 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$Y5QeFHNQlbuDF8fRnfahyBKQ8LwEpMwEUAWw1ork8stz6Viqnjy1S','user','ak_7af62631d3716d7b','2023-07-28 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$9gPYcOUS3gVsxM7SFmUxEzduzPyKhfk8Trs0CVppq8tz/SV9kzFmQ','user','ak_b6212fb5605f12e1','2023-06-28 10:18:00',NULL);

