-- Host: db-master-2.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=15901;

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$yHo.vg1tqKjVL3rphjcmA2pI434xrCTyzQ25NBDbIxyjwNSBv30kf','admin','ak_6c26cb9670a5de97','2023-10-21 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$4caO8b.ysY8miZJPhviUTAp3xjelRIGm1z8C5dW8cevGZskR2/py1','user','ak_6ddff263bc94b199','2023-09-01 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$Ro0ygzS70V6Ozm/9MlHYcuqnNvp3O8WxvQqYhefUaYjdeICmoRbzD','user','ak_61cd408b8e5fa425','2023-05-25 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$nidzXbYTkWNBnUyi.o7cp1xCZV0WRwLU6nj2.iON.LV97RPsx92gU','admin','ak_66e370a522f51426','2023-06-09 10:15: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=6902;

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

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


