-- Host: db-master-8.internal    Database: customers


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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$1dC.gitefM4mhtNGwxDMag5hgRPDfqvlNwqBnZscLo.VJ8Pqqnk2Z','admin','ak_d856894dbe3d4f34','2023-10-09 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$OKm6R8D9yuBJJ4YyXKDWYKxyknTn2/tEc82AiCDhi/.aGV53pdeTq','user','ak_73f3f178ceacd396','2023-04-26 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$LT.qU5.S0i.6/5fBZJ74HOoShsixDr568jn9X3fFNbNCXP9YFWNTo','user','ak_efc90541456bdf96','2023-05-26 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$RalHduIEFu5tgTDkczSBCSFYwTmpKXlc6xMx0oGN4kSqY1ox74n6x','user','ak_01c0d69053dbbe89','2023-05-10 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$wOQI/ZxLoajPgRAvZacL03FsbWuvqTdIb8j6Ccx9JLWLcgo3wGKHb','user','ak_5660ba69e6c3594b','2023-12-26 10:17:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@corp.net','$2b$12$mHFqZiuaIagOavaktmiDCWscbGo2hnqY1f4m/O5N.bIh6TEUv1BdX','admin','ak_0bd4ba7bd97846b9','2023-09-23 10:06:00',NULL);

