-- Host: db-master-7.internal    Database: production_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=44152;

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$U0Qxsf8rVakDVoxTrHBT8PaTuMwixSowvSw2L5ze5cs3SWgBAJvTL','admin','ak_9873fcc0d1e94e6d','2023-12-06 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$mUFT60CuRdTyuuV4SIz7pWrKtasnm/4iMSS2N3OGSbHFWC6XOk2Wq','user','ak_a836f9b5d80fe7da','2023-01-08 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$17zEL3VIfMdKPEnzisSgeny8fesdds5DdTerbanqi0GvVvz/wUdWD','admin','ak_c7efaef1f26a468b','2023-12-28 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$k4Eo6YL/Dw1r.L1g45VPMUzGIxSd2nUWufPVJJvG5GJUiyUIvLCPS','admin','ak_59c954d17b12758d','2023-05-09 10:20:00',NULL);

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

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


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

--
-- Dumping data for table `payments`
--


