-- Host: db-master-1.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=21574;

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$N1rxbTHBtBJI6UTDPVAOoUBB.8NotTJvPjalY5n/DzOTDog2RSV7t','user','ak_bc30c15f7ec797cc','2023-04-24 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$rot4lr8vwt2/SUcUY8raSxAxKXk4TanUP4JD6h2Xax.90v4o2eSzG','admin','ak_9d8ba3eec5866595','2023-11-05 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$g6U/yCbvEp.xoU/SXofR8N8xOwoEZDyxvrwGY.gmdBcZf2kpuOxpO','admin','ak_f135d534be4ef6d1','2023-06-27 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$wMh1cvq58nMkq1A9xl5mJjuaTezMyKXoAJAjur61dxS6l.8BR1rIH','admin','ak_aea87e583f55d951','2023-08-14 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$UkXS2drcO8FKxX1U/I/PSl8DtHzQdvjDkuSalGTYEwxPkQWewzvBF','user','ak_1e55fecf545f51a0','2023-06-05 10:07:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@corp.net','$2b$12$8gLAod2RCsNhSianxWJ59etHwpxkzL2O3VO1u5BxAdQ696Bz4Pdxo','user','ak_1032c2ad4597ac4e','2023-02-20 10:14: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=42659;

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

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


