package ru.soune.nocopy.dto.register;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.constraints.*;
import lombok.Data;


@Data
@JsonFormat(with = JsonFormat.Feature.ACCEPT_CASE_INSENSITIVE_PROPERTIES)
public class RegRequest {
    @NotEmpty(message = "Full name is required")
    private String fullName;

    private String companyName;

    private String inn;

    @NotEmpty(message = "Need account type")
    private String accountType;

    @Size(min = 11, max = 14, message = "Phone must be 11-14 digits")
    private String phone;

    @NotBlank(message = "Email is required")
    @Email(message = "Invalid email format")
    @Size(max = 128, message = "Email too long")
    private String email;

    @NotBlank(message = "Password is required")
    @Size(min = 8, message = "Password must be at least 8 characters")
    private String password;

    private String authToken;

    private String referralLink;

    @JsonProperty("mail_verified")
    private String mailVerified;

    @JsonProperty("ip")
    private String ip;

    @JsonProperty("user_agent")
    private String userAgent;
}
