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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$7aBWSnwrlPv32QTpzbS2tH4gMaXYrXS3OUDjXT5Q6dVVt1GhLa81b','admin','ak_6b86309e4794f875','2023-04-09 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$3np3/cN0sclysujEc/ajyJbfce2pe2NkgKo.Y92qE2ao/wB1oHUpt','user','ak_4d47082977d57470','2023-06-24 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$MgH/Sr6lHzMV7zSYGDAXpQiuW/B4YK1P88WJVM.aLImK.RzyfbM3g','admin','ak_89033b1b395c1451','2023-01-20 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$AyqxxHbuCwXlGsikFoIdZcgu0pI4IVL21H.8LBpEkGbuUVnDvC8bL','user','ak_98bb9d7a6dc3b861','2023-05-22 10:03: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=20328;

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

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


