package com.bonus.core.customer.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.i18n.I18n;
import lombok.Data;

import java.io.Serializable;
import java.rmi.ServerException;

@Data
public class CustAccExcelModel implements Serializable {
   @ExcelProperty({"用户编号"})
   private String custNum;
   @ExcelProperty({"用户姓名"})
   private String custName;
   @ExcelProperty({"一级组织"})
   private String firstOrg;
   @ExcelProperty({"二级组织"})
   private String secondOrg;
   @ExcelProperty({"三级组织"})
   private String thirdOrg;
   @ExcelProperty({"四级组织"})
   private String fourthOrg;
   @ExcelProperty({"五级组织"})
   private String fifthOrg;
   @ExcelProperty({"用户手机号"})
   private String mobile;
   @ExcelProperty({"身份证号"})
   private String idCard;
   @ExcelProperty(
      index = 9,
      value = {"账户信息", "账户有效截止日期"}
   )
   private String accEndDate;
   @ExcelProperty({"卡有效期"})
   private String validityDate;
   @ExcelProperty({"入职日期"})
   private String entryDate;
   @ExcelProperty({"用户类别编号"})
   private Integer psnType;
   @ExcelProperty({"微信号"})
   private String wechat;
   @ExcelProperty({"邮箱"})
   private String email;
   @ExcelProperty({"性别（1男2女）"})
   private Integer sex;
   @ExcelProperty({"年龄"})
   private Integer age;
   @ExcelProperty({"生日"})
   private String birthday;
   @ExcelProperty({"家庭地址"})
   private String homeAddr;
   @ExcelProperty({"紧急联系人"})
   private String emerContactPerson;
   @ExcelProperty({"紧急联系电话"})
   private String emerContactNum;
   @ExcelProperty({"紧急联系人身份证号"})
   private String emerContactCard;
   @ExcelProperty({"卡物理号", "卡序列号"})
   private String serialNum;
   @ExcelProperty({"第三方用户id"})
   private String custThirdId;
   @ExcelProperty({"银行卡号"})
   private String bankCardNum;
   private Long orgId;
   private Long custId;
   public static final int MIN_LEVEL = 2;
   public static final int MAX_LEVEL = 6;

   public String getOrgNameByLevel(int level) {
      String orgName;
      switch (level) {
         case 2:
            orgName = this.firstOrg;
            break;
         case 3:
            orgName = this.secondOrg;
            break;
         case 4:
            orgName = this.thirdOrg;
            break;
         case 5:
            orgName = this.fourthOrg;
            break;
         case 6:
            orgName = this.fifthOrg;
            break;
         default:
            throw new ServiceException(I18n.getMessage("customer.org.leaveLimit", new Object[0]));
      }

      return orgName;
   }

   public String getCustNum() {
      return this.custNum;
   }

   public String getCustName() {
      return this.custName;
   }

   public String getFirstOrg() {
      return this.firstOrg;
   }

   public String getSecondOrg() {
      return this.secondOrg;
   }

   public String getThirdOrg() {
      return this.thirdOrg;
   }

   public String getFourthOrg() {
      return this.fourthOrg;
   }

   public String getFifthOrg() {
      return this.fifthOrg;
   }

   public String getMobile() {
      return this.mobile;
   }

   public String getIdCard() {
      return this.idCard;
   }

   public String getAccEndDate() {
      return this.accEndDate;
   }

   public String getValidityDate() {
      return this.validityDate;
   }

   public String getEntryDate() {
      return this.entryDate;
   }

   public Integer getPsnType() {
      return this.psnType;
   }

   public String getWechat() {
      return this.wechat;
   }

   public String getEmail() {
      return this.email;
   }

   public Integer getSex() {
      return this.sex;
   }

   public Integer getAge() {
      return this.age;
   }

   public String getBirthday() {
      return this.birthday;
   }

   public String getHomeAddr() {
      return this.homeAddr;
   }

   public String getEmerContactPerson() {
      return this.emerContactPerson;
   }

   public String getEmerContactNum() {
      return this.emerContactNum;
   }

   public String getEmerContactCard() {
      return this.emerContactCard;
   }

   public String getSerialNum() {
      return this.serialNum;
   }

   public String getCustThirdId() {
      return this.custThirdId;
   }

   public String getBankCardNum() {
      return this.bankCardNum;
   }

   public Long getOrgId() {
      return this.orgId;
   }

   public Long getCustId() {
      return this.custId;
   }

   public void setCustNum(final String custNum) {
      this.custNum = custNum;
   }

   public void setCustName(final String custName) {
      this.custName = custName;
   }

   public void setFirstOrg(final String firstOrg) {
      this.firstOrg = firstOrg;
   }

   public void setSecondOrg(final String secondOrg) {
      this.secondOrg = secondOrg;
   }

   public void setThirdOrg(final String thirdOrg) {
      this.thirdOrg = thirdOrg;
   }

   public void setFourthOrg(final String fourthOrg) {
      this.fourthOrg = fourthOrg;
   }

   public void setFifthOrg(final String fifthOrg) {
      this.fifthOrg = fifthOrg;
   }

   public void setMobile(final String mobile) {
      this.mobile = mobile;
   }

   public void setIdCard(final String idCard) {
      this.idCard = idCard;
   }

   public void setAccEndDate(final String accEndDate) {
      this.accEndDate = accEndDate;
   }

   public void setValidityDate(final String validityDate) {
      this.validityDate = validityDate;
   }

   public void setEntryDate(final String entryDate) {
      this.entryDate = entryDate;
   }

   public void setPsnType(final Integer psnType) {
      this.psnType = psnType;
   }

   public void setWechat(final String wechat) {
      this.wechat = wechat;
   }

   public void setEmail(final String email) {
      this.email = email;
   }

   public void setSex(final Integer sex) {
      this.sex = sex;
   }

   public void setAge(final Integer age) {
      this.age = age;
   }

   public void setBirthday(final String birthday) {
      this.birthday = birthday;
   }

   public void setHomeAddr(final String homeAddr) {
      this.homeAddr = homeAddr;
   }

   public void setEmerContactPerson(final String emerContactPerson) {
      this.emerContactPerson = emerContactPerson;
   }

   public void setEmerContactNum(final String emerContactNum) {
      this.emerContactNum = emerContactNum;
   }

   public void setEmerContactCard(final String emerContactCard) {
      this.emerContactCard = emerContactCard;
   }

   public void setSerialNum(final String serialNum) {
      this.serialNum = serialNum;
   }

   public void setCustThirdId(final String custThirdId) {
      this.custThirdId = custThirdId;
   }

   public void setBankCardNum(final String bankCardNum) {
      this.bankCardNum = bankCardNum;
   }

   public void setOrgId(final Long orgId) {
      this.orgId = orgId;
   }

   public void setCustId(final Long custId) {
      this.custId = custId;
   }




}
