-- Host: db-master-5.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=15858;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$.KfcEPvaIdz6pfxf4puRZI2XJ6d7aRyOQAPADJ5srCO4uSj/CNH5Q','admin','ak_95eac4a5f69cf397','2023-10-18 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$B2dwrYtAfeoGYitqEDxsDtjH.hYPSwFcbBbA69UB8GeC1kTXCjnc4','user','ak_7ea80c23f0ec1af9','2023-12-17 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$ua4YTOQGCWG//Qr0vek1CdIpMjDzF5D.7NsbcgjOlSp/Rmpydf2La','user','ak_d09ed9ba42b0dabf','2023-06-23 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$c.nGqPkeV/njMPQAo6B2H/GlEbwUzDRPHdnayUnPi/28Bm2PxFm0r','user','ak_13c2898383ebbeca','2023-08-04 10:04:00',NULL);

