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


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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$rSbM7Fp6N6w57FFy58QTlWL2pr0kYwYHyVg4UlCrE8j0gKTIrUH.p','admin','ak_79bc9cb1a70ed8f8','2023-03-16 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$Y9T9mOkymvi3oqI0YOoyceYQyWS0dmOmazYrm0923yQyLDav5cfl4','admin','ak_48bf5ac53631cb6d','2023-05-05 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$NH5aBVYdh44lT1WD7Rq3wallARGjzXJlZfAzpRtmrvt3589Gm4TVy','user','ak_f24adb73358b98c4','2023-12-03 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$aEDIsbc0/fHzEnEGeaANP8SMEoXiNEqSseHp5EvwCPqm19Ps1Hxz2','admin','ak_7033ed89dc8d1b1f','2023-11-26 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=15084;

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


