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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$fX4wa3hCZfFjBPmh16XEujHbJaHpcQezqYHyr0f43rMeYc2oi9Hl0','user','ak_fd215836cd9b00e1','2023-09-24 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$giRSJSY9ZbysR9w2h3KtMue9lbEWVAmxUPPz.KVtZJNNZbYwFpWvW','user','ak_5dea46ffa47dd597','2023-02-02 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$3lEc3LDowTsvUR7TWGV7kCoBYlVA6rc0b9lbFPB5z1VO58vbOG9gr','admin','ak_794c817985092f56','2023-03-20 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$9hBTfXRRpNS7qAtM1EWpjF9tkwfdniW6SSSrnqEyqVY31v7Z2CO2Y','user','ak_983ac5ea13577556','2023-03-10 10:07:00',NULL);

