package online.wesal.wesal.dto;

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

public class CreateUserRequest {
    
    @NotBlank
    @Pattern(regexp = "^\\+[1-9]\\d{1,14}$", message = "Phone number must be in international format starting with + and country code")
    private String phoneNumber;
    
    @NotBlank
    @Size(min = 6)
    private String password;
    
    @NotBlank
    private String displayName;
    
    public CreateUserRequest() {}
    
    public CreateUserRequest(String phoneNumber, String password, String displayName) {
        this.phoneNumber = phoneNumber;
        this.password = password;
        this.displayName = displayName;
    }
    
    public String getPhoneNumber() {
        return phoneNumber;
    }
    
    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }
    
    public String getPassword() {
        return password;
    }
    
    public void setPassword(String password) {
        this.password = password;
    }
    
    public String getDisplayName() {
        return displayName;
    }
    
    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }
}