package br.com.rayankonecny.hdcommoslib.models.requests;

import java.io.Serial;
import java.io.Serializable;

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

public record AuthenticateRequest(

    @Schema(description = "Email of the user", example = "rayanvix@gmail.com")
    @Email(message = "Invalid email format")
    @NotBlank(message = "Email cannot be blank")
    @Size(min = 6, max = 50, message = "Email must contain between 6 and 50 characters")
    String email,

    @Schema(description = "Password of the user", example = "P@ssw0rd!", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "Password cannot be empty")
    @Size(min = 6, max = 20, message = "Password must contain between 6 and 20 characters")
    @NotBlank(message = "Password cannot be blank")
    String password) implements Serializable {
  @Serial
  private static final long serialVersionUID = 1L;
}
