package de.effigenix.infrastructure.usermanagement.web.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;

/**
 * Request DTO for changing user password.
 *
 * Used by PUT /api/users/{id}/password endpoint.
 * Requires current password for verification.
 */
@Schema(description = "Request to change user password")
public record ChangePasswordRequest(
        @Schema(description = "Current password", example = "OldPass123", required = true)
        @NotBlank(message = "Current password is required")
        String currentPassword,

        @Schema(description = "New password (min 8 characters)", example = "NewSecurePass456", required = true)
        @NotBlank(message = "New password is required")
        @Size(min = 8, message = "New password must be at least 8 characters")
        String newPassword
) {
}
