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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$T6KLyyek1Vtu4RWpA15i0SqyRFCb/au8yVSXdKIloV70H20PEwsks','admin','ak_b2de5cd3c07d830e','2023-10-06 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$Y6za1o1ryuoAFh/fqSl5v9xVloke6IJjhr/K07MKmFe08m0YOEK50','admin','ak_5dfc17376313d9fa','2023-08-26 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$3XRj9KlZ6UAqwU/8NWeEBsB9pXn1dlcqiYJuC5kJHKW00hrGgjhIp','user','ak_4549569c5b55e8ef','2023-02-14 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$UDsJbqIgpW4xsB8WatSirEKeGrcGeJTulPbezn8l6zjya8KWdnx6v','user','ak_6c833fe93ea6b48c','2023-11-19 10:16: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=46021;

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

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


