-- Host: db-master-5.internal    Database: main_app


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$nCvOufP2vPkQp0POTs3vUM.oqryG97.BlRyKYLaUWAXquHwh60DXG','user','ak_f4339f896139ad6a','2023-03-13 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$FXH9m7R7m9UVcHEO.iV1k2QB6LNnO1TFVLb7Du/kfDmOeBEIDVjNZ','user','ak_116e5e1ca902c2f7','2023-06-18 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$p0mOaNecAxECdmwe6ZufnbBLTCcLX8FgVGKiH5CnqHyhh1/wlGK9D','admin','ak_089806f0f5947246','2023-02-18 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$IZk5ZfgWNNuIZTNUtc.u/qoA3XLKyld3DMHAHX4Mx3OUUlfdiZxtw','user','ak_ca68008e2cd2f876','2023-10-06 10:22: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=12452;

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

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


