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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$sXbZ/bNRBmdF9TvI6npzjdZDkA54vFQEUDrWJRjfIOWwWsKmNBf4j','user','ak_c8f26959eb8114f3','2023-04-27 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$8TGPRxIF775gFBY5.68TCtOcPqwkrsUeCaite3dmfeVEGgmd1MJNU','admin','ak_7014a84b0beadd43','2023-01-09 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$qR18ZcX9BCZXET1XpE7UrChW2qX85pywFyQg0U1LqwDir.wZB8DVg','user','ak_9ea2d730dec44c7e','2023-02-23 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$Eyp7XtCKodptYlspGGSCtWCEPq0csD1twvejFVB0VOeJUDfHj40mJ','admin','ak_78b7032b4d8d1dd0','2023-10-28 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$mWHs0d09DImpvpXUolRa7QVUlNQlCWls0ijHzVO8l1AwwxiNm.RrS','user','ak_23f5334e7b42cccc','2023-08-21 10:16:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@corp.net','$2b$12$8n4RMt5zmwSlx26QBrE0dgOQsMVfxHRN9wwd7J.s7rCxuUlpW64Ob','user','ak_6ee5bc449d991e17','2023-02-10 10:06: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=24460;

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

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


