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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$BFkaqAvMOQO8j4LV5qpxv9ByJB.i7WkE5XoDUpuCqchyNHp583bXc','user','ak_99e34ecb904ff645','2023-04-09 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$5m7296WdtzGnSJWIpIk1g0DIAHG1kh5eOItu.oWzq51xTQXVrSmSb','user','ak_c214d1256309f67e','2023-07-27 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$WaopTws6HTE.IPBqVxB6jXpoJpT7HFt6qukLaTrj7rm17l0A1wJkg','user','ak_21ef15a7715c4c07','2023-08-11 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$RkQsALYKE6gHQejoZwl0D6XPpE8Y/XMZQxf9IaAcAOKk.H2XjgENm','user','ak_5cba148041c9c3da','2023-08-19 10:19:00',NULL);

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

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


