-- Host: db-master-8.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=44324;

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$LUMCMDrO31oBFAJIc2Kbsh2HGLvfnquJNHcuSHuMKkIUmHGMD2a44','user','ak_d568b7613ec1eb9e','2023-05-02 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$iAhTpr4ZceUalowsWLn/OIPUAE82dtyLAQ09I5nEdorrnbVTBtbfr','user','ak_3e08aeddd9b57eda','2023-09-22 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$DQk49APkms6mpr8/n784CcewHX5TUVK1FEzxoTKge/NAh5zkRNyDt','user','ak_0268574c2aa32367','2023-04-25 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$.4WUjL2tp9hA13Bf5CO2mZy48bvVT8fkFnLHcikYKUi1pAXdb99L8','admin','ak_0f7e8d7953dad584','2023-03-09 10:09: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=6373;

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

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


