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

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$8EoyPEQHRUziyOEjmhvvh3Ft9t98yDMX6mGuZ2.jB07CO2VNHaldz','user','ak_f07810e437187ddb','2023-11-24 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$FVxe1DteEromlpcMWT3/zMmhZiBNXRbhRbAUqPjXPXMmHip2wA8Hk','user','ak_5eab2f62aec1fea7','2023-11-26 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$MTTse6SgE/Vn/oABdYRCQXIBmeuEZaH2eykR3C.kRWnn90U2rq6jQ','user','ak_a39ae1f123230753','2023-10-07 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$zXwnGUvXm7UsaffyRrkrfzOtp6xYH60kQggcZnnMpeqTU9tKQIlqn','user','ak_a65418a25ce0a258','2023-09-08 10:07:00',NULL);

