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

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


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$xLlRnruEkyucStFlRWKEwjZAAY7BBJ8jW6UFBz7TNK4VZDaLIkJtN','user','ak_823a477863465cbc','2023-01-10 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$N8S/4oc5FXg.WFj3z6/p3eOz6TcU2gfc9L285/r3qA4FcnHj9kA6b','user','ak_7413a28d230ea285','2023-07-15 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$jFLkrzAq1IqRGTr4noX2D6HRDpR/QMjzcg6aAgaEfiujro37RXguV','user','ak_4d0539944a11e171','2023-09-14 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$uaJHBPWWlivpQGUeIk9ZNe49LjeV6C3xu1RKsdgEywfhoCFjxqfAI','admin','ak_9d06fef94a99a9ee','2023-04-04 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$ItfljJQkNPb1KytSj9UzU.AsQykWxMt/zGQjbF/nB2URiCMjCreaG','user','ak_2d9d14abaf422b86','2023-10-08 10:00: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=28012;

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


