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

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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$358iozDit6HwY0fiqprw1wkZ1zJrE8ouCgxZjkA4ufFtFh/NkIf7a','user','ak_abd6ac80d498b88b','2023-11-08 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$rB06XKHbsgK4OkoB.PLjFnzzWgkAXK3f2huVmv0qkbewRspv7FauC','user','ak_71a12cd8ef36c2eb','2023-09-07 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$IR1jq1AoUEG0Jy0Us8xTPZ6VGkeiSZqnx3kjv5YBQrK/5vJIwX07P','user','ak_16e4eca69305a512','2023-04-28 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$v.6Z0daBhRcUaEFCShbO4NItZml4MzvaHpgQdj183Zk0gcpN5rbmG','user','ak_2d582b7dc5f585dc','2023-02-24 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$p5J.eybTVHOmmSKT8teLfbOB8AKn/c1Y0dXG0sizzvNvlFJtKRUYg','user','ak_0b14609ee43a5128','2023-09-27 10:15:00',NULL);
INSERT INTO `users` VALUES (6,'root@example.org','$2b$12$dngjSdU2H0ONh46/Swu4pW7fLgovS/E8ztFlNANT/KZYImuBKYiBn','user','ak_cae567353d3c4e07','2023-04-14 10:06:00',NULL);
INSERT INTO `users` VALUES (7,'dev_ops@example.org','$2b$12$J6.lsFhosL4P41dW0x/5U5a5IwQT4h68dKeB52VJugfAlXGPQordo','user','ak_1d988d1c8d5abb9c','2023-11-13 10:05:00',NULL);

