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


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$GNd9qWotu0uZgRDYSt7TBufr/SAhlpV2MiT5LIVadgZS5upPDsbkt','user','ak_fbcfe74d973efb25','2023-02-05 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$Pg4FdiRXTmA3vj0T7HbrbE60Uq4IY5Ez7ZX/okuMeKCFAAQh.EMF/','admin','ak_23f89b0ec3d7b1ae','2023-09-23 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$78lzynXKwthqFXPQMTZn/cIWRY4O0ezIoKwUpQCm8DLXrzMeEsqgj','user','ak_01044dfe7e51b879','2023-05-01 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$P0SVwj9jyZJ8BlAxi/XnXQwwRdvo.RTPsEu7jzhea7fdiHn.826Av','user','ak_36989421f40c68c5','2023-08-25 10:19: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=47301;

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

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


