package de.cannamanage.api.dto.auth;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;

/**
 * Request DTO for setting password via invite token.
 * Password complexity: min 8 chars, at least 1 digit + 1 special character.
 */
public record SetPasswordRequest(
        @NotBlank String token,
        @NotBlank
        @Size(min = 8, max = 100, message = "Password must be between 8 and 100 characters")
        @Pattern(regexp = "^(?=.*\\d)(?=.*[!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>/?]).+$",
                message = "Password must contain at least 1 digit and 1 special character")
        String password
) {}
