-- Host: db-master-1.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=17813;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$dmkI7dc/m75bQ.wWVom4iCmELnB0c0t66OYM6p4JhdEhpAIhXFce0','user','ak_1187b71bf8b162fd','2023-04-17 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$06U4fjB4d9uYQy1Z9J2PzPF6cPxDQ/weHYe4IhMm/fn5V9lmoBIzz','user','ak_c41eb9141d78f051','2023-11-18 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$PrGiQcMN.IZfj6J602a9A9Tf2ov66zBMiqzOPeQeZ8LLC0vZmIQSO','admin','ak_fe94a7ad4ffcb9f8','2023-04-07 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$xwrIQJXjs8hXL3vC17ABePMQ/Cghf5frOEaabkDZZ1u33pakqC0.D','user','ak_1c8893c1d9fbedb3','2023-03-25 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$AeiKNMDYJwI8jClylhcfVkcZI2PtkcECSPiB2.cTH5HI7NVZmt.QR','user','ak_59319ec6544ef4c3','2023-12-28 10:16:00',NULL);

