package kr.co.zumo.app.lifeplus.bean;

import android.support.annotation.StringDef;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * MobileAuthBean
 * <pre>
 * </pre>
 *
 * @author 하세미
 * @version 1.0
 * @history 하세미   [2018-09-17]   [최초 작성]
 * @since 2018-09-17
 */
public class MobileAuthBean extends JsonBeanBase {

  public static final String BIRTH_DATE_FORMAT = "yyyymmdd";

  public static final String GENDER_MALE = "남자";
  public static final String GENDER_FEMALE = "여자";

  @Retention(RetentionPolicy.SOURCE)
  @StringDef({GENDER_MALE, GENDER_FEMALE})
  public @interface Gender {}

  public static final String NATIONALITY_DOMESTIC = "내국인";
  public static final String NATIONALITY_FOREIGNER = "외국인";

  @Retention(RetentionPolicy.SOURCE)
  @StringDef({NATIONALITY_DOMESTIC, NATIONALITY_FOREIGNER})
  public @interface Nationality {}

  private String name = "";
  private String nationality = "";
  private String birthDate = "";
  private String gender = "";
  private String mobileCompany = "";
  private String firstPhoneNumber = "";
  private String phoneNumber = "";
  private List<Boolean> agreeList;

  public MobileAuthBean() {
    agreeList = new ArrayList<>(Arrays.asList(false, false, false, false));
  }

  public String getFirstPhoneNumber() {
    return firstPhoneNumber;
  }

  public void setFirstPhoneNumber(String firstPhoneNumber) {
    this.firstPhoneNumber = firstPhoneNumber;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getNationality() {
    return nationality;
  }

  public void setNationality(@Nationality String nationality) {
    this.nationality = nationality;
  }

  public String getBirthDate() {
    return birthDate;
  }

  public void setBirthDate(String birthDate) {
    this.birthDate = birthDate;
  }

  public String getGender() {
    return gender;
  }

  public void setGender(@Gender String gender) {
    this.gender = gender;
  }

  public String getMobileCompany() {
    return mobileCompany;
  }

  public void setMobileCompany(String mobileCompany) {
    this.mobileCompany = mobileCompany;
  }

  public String getPhoneNumber() {
    return phoneNumber;
  }

  public void setPhoneNumber(String phoneNumber) {
    this.phoneNumber = phoneNumber;
  }

  public void setAgree(int index, boolean isAgree) {
    agreeList.set(index, isAgree);
  }

  public List<Boolean> getAgreeList() {
    return agreeList;
  }

  public String getFullPhoneNumber() {
    return firstPhoneNumber + phoneNumber;
  }

}
