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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$IiKf2GpOBmSzaEEBjJJlCU91F0sS3EnAK7/lm1ssE6owv0XCldOLU','user','ak_b58fce8ca98d7d94','2023-07-12 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$eQZZfbBh/s3UuYw0NI.YvMvP/.vf20G8boCRpOJhGUWZOfL0glB4d','admin','ak_ec52a642f038eb6a','2023-05-25 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$X7IYYJ6CO/KjM8xai1GW5mFXLGoUhei/e/511RJOQNqUTo78vJyH6','user','ak_9de45e15edc83001','2023-05-03 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$OoWHbrqCTMTs6IvjIgLPQ28YAedVzxJVJBHl9JaSp62S6LEoa9PEx','admin','ak_c2e97e384bdcf490','2023-11-05 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$AvX17royGtoVFNRwHpMbcWaBbrICCNFv9PfmOLpCDnaIQbqz80rRV','user','ak_b5f660d0531baebe','2023-01-08 10:15: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=42325;

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


