-- Host: db-master-9.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=16357;

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

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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$xh8nag6Y9iOzySr74j39n7nuGTUs4RBLycQCoo9OcSl2Ca26Igy1Q','admin','ak_7e4b43a20a50cf2c','2023-03-10 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$GrMZJSDiZQiWcO/KVl4750YtAGCNBohpjNRmag2k95P9leZaa9fSU','user','ak_2c82f4f0665dba20','2023-10-26 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$UoTYMrat8adB0K2XpbIuZoH7RzldEqF8SHpj3ihz0AvTXyeSe50/5','user','ak_4cdc165cad91d422','2023-05-17 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$anzeLNRNzPEVOvLzuNv4R7LYsOIgUusOpUeR9./UUwGbx431pdt93','user','ak_029c40a2ded13478','2023-05-09 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$ItreKgt5v192oogpTSJ1gejp186RUgisgbG0gZ.pQRnNhsF0wGJ8l','user','ak_3fd2d5fc4a258c9a','2023-08-14 10:12:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@example.org','$2b$12$PsmN3gE1H6g6Yvw4Z6j8wtihr7IEufavfvCWR4D9glP8C66d9rfuh','admin','ak_d815afa19328a82f','2023-06-28 10:15:00',NULL);

