package com.red.circle.other.inner.model.cmd.user.account;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.io.Serializable;
import lombok.Data;

/**
 * 手机号码验证.
 *
 * @author pengliang on 2021/3/25
 */
@Data
public class MobileAuthCmd implements Serializable {

  private static final long serialVersionUID = 1L;

  /**
   * 手机号码前缀.
   */
  @NotNull(message = "phonePrefix required.")
  private Integer phonePrefix;

  /**
   * 手机号码.
   */
  @NotBlank(message = "phoneNumber required.")
  private String phoneNumber;

  /**
   * 密码.
   */
  @NotBlank(message = "pwd required.")
  private String pwd;

  /**
   * 验证码.
   */
  private String code;

  public String getFullPhoneNumber() {
    return phonePrefix + "," + phoneNumber;
  }
}
