-- Host: db-master-5.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=1287;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$uGUDhc6kHkRqLg7mOItbgsMtHI8jc/FEd8AK0tyIGA5K2u49gNnOT','user','ak_6d57400d16d2ad35','2023-05-12 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$L0A4KYOGYvHDfMIvlydRml3Esh8K3IbzjUVD7gChlZ0DuZ2rRaqzX','user','ak_d698390e250a3022','2023-10-26 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$8x2.H.OXujc64QN9m.b6CSMPzt/DcXl/9cSyuj2/Bmr70YBfBwUQz','admin','ak_3283ca209e26acde','2023-01-28 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$9t/DRaSluirs4fxmVD0K5XvKcaqxd1NC1KTbRiwBqMsCJdCpw.2Mt','user','ak_14d7c11d01cf3995','2023-12-04 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$vG2/HValYDLCFroKZxJAvFZczLm/iPkFvA4Ay9znAvrAqqc/FVlXA','user','ak_7797340299fa1a7f','2023-03-10 10:21:00',NULL);

