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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$13e/aRh/ZBnwo109.DzMTBki6CjkT/47uoGjmV9A.nzdCvYtA8zWD','admin','ak_a482ea79f19ae9e4','2023-04-15 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$Kp2qBaGZPDtApGSzIA.LtY.uDOuxByJJObx0fEplaFRF8H.IJ70.l','user','ak_21ce3d09ebf8230c','2023-02-14 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$W2O0L0cUtlLjV0vBkARCLGzzf3SB1q8FONzj1qvYnYdzy5wf40UMQ','user','ak_14d62d53f13bd727','2023-10-07 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$sNqSdoZ90DE9pp02qt0tPvrBUxCTlgXZyPRSwpTOZEx/1JqtvD6ap','admin','ak_0b85afc52d2d1bbd','2023-08-13 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$w8qtUpy2c0cuzAXYFPxew4mZPNzJSllUVIljIwmdKGoMXloceKF4t','admin','ak_f57cb9ee380c5cea','2023-06-26 10:20:00',NULL);

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

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

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


