package ru.soune.nocopy.dto.register;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonFormat(with = JsonFormat.Feature.ACCEPT_CASE_INSENSITIVE_PROPERTIES)
public class LoginRequest {

    @NotBlank(message = "error.not.blank") @Email(message = "error.not.email") @Size(max = 128)
    private String email;

    @NotBlank(message = "error.not.blank") @Size(min = 8)
    private String password;
}
