package com.bonus.core.customer.model;

import com.baomidou.mybatisplus.annotation.*;
import com.bonus.core.common.encrypt.CipherQueryLikeHandler;
import com.bonus.core.common.encrypt.SM4EncDecHandler;
import com.bonus.core.common.utils.SysUtil;
import com.bonus.utils.ValidationGroups;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;

@TableName(
   value = "cust_info",
   autoResultMap = true
)
@ApiModel("人员资料表")
public class CustInfo {
   private static final long serialVersionUID = 1L;
   @TableId
   @ApiModelProperty("主键自增")
   private Long id;
   @ApiModelProperty("人员id")
   private @NotNull(
   message = "{customer.id.nonNull}",
   groups = {ValidationGroups.Update.class, ValidationGroups.Delete.class}
) Long custId;
   @ApiModelProperty("人员编号")
   private @NotNull(
   message = "{customer.num.nonNull}",
   groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class}
) String custNum;
   @ApiModelProperty("人员姓名")
   @TableField(
      value = "cust_name",
      typeHandler = SM4EncDecHandler.class
   )
   private @NotNull(
   message = "{customer.name.nonNull}",
   groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class}
) String custName;
   @ApiModelProperty("人员姓名")
   @TableField(
      value = "cust_name_like",
      typeHandler = CipherQueryLikeHandler.class
   )
   private String custNameLike;
   @ApiModelProperty("人员限制id")
   private Integer custLimitId;
   @ApiModelProperty("第三方人员id")
   private String custThirdId;
   @ApiModelProperty("推送到设备上，生成的用户id")
   private String custDeviceId;
   @ApiModelProperty("手机号")
   @TableField(
      value = "mobile",
      typeHandler = SM4EncDecHandler.class
   )
   private String mobile;
   @ApiModelProperty("手机号")
   @TableField(
      value = "mobile_suffix",
      typeHandler = SM4EncDecHandler.class
   )
   private String mobileSuffix;
   @ApiModelProperty("登录密码")
   private String pwd;
   @ApiModelProperty("身份证号")
   @TableField(
      value = "id_card",
      typeHandler = SM4EncDecHandler.class
   )
   private String idCard;
   @ApiModelProperty("邮箱")
   private String email;
   @ApiModelProperty("性别 1-男 2-女")
   private Integer sex;
   @ApiModelProperty("年龄")
   private Integer age;
   @ApiModelProperty("生日")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private LocalDate birthday;
   @ApiModelProperty("民族编码")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private Integer ethnicityCode;
   @ApiModelProperty("籍贯")
   private String nativePlace;
   @ApiModelProperty("人脸照片地址")
   private String custPhotoUrl;
   @ApiModelProperty("头像地址")
   private String headPortraitUrl;
   @ApiModelProperty("所属组织id")
   private @NotNull(
   message = "{customer.org.nonNull}",
   groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class}
) Long orgId;
   @ApiModelProperty("机构编号")
   private String orgNum;
   @ApiModelProperty("机构全称")
   private String orgFullName;
   @ApiModelProperty("成本中心id")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private Long costCenterId;
   @ApiModelProperty("所属位置")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private Long placeId;
   @ApiModelProperty("所属位置名称")
   private String placeFullName;
   @ApiModelProperty("人员类别")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private Integer psnType;
   @ApiModelProperty("人员类别名称")
   private String psnTypeName;
   @ApiModelProperty("家庭地址")
   private String homeAddr;
   @ApiModelProperty("QQ")
   private String qq;
   @ApiModelProperty("微信")
   private String wechat;
   @ApiModelProperty("企业微信")
   private String companyWechat;
   @ApiModelProperty("钉钉")
   private String dingtalk;
   @ApiModelProperty("支付宝openid")
   private String alipayOpenid;
   @ApiModelProperty("紧急联系人")
   private String emerContactPerson;
   @ApiModelProperty("紧急联系电话")
   private String emerContactNum;
   @ApiModelProperty("紧急联系人身份证号")
   private String emerContactCard;
   @ApiModelProperty("职位")
   private String job;
   @ApiModelProperty("职位等级")
   private String jobRank;
   @ApiModelProperty("职位级别")
   private String jobLevel;
   @ApiModelProperty("职称")
   private String jobTitle;
   @ApiModelProperty("职称等级")
   private String jobTitleRank;
   @ApiModelProperty("编制")
   private String authStrength;
   @ApiModelProperty("职务")
   private String position;
   @ApiModelProperty("入职日期")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private LocalDate entryDate;
   @ApiModelProperty("合同签订日期")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private LocalDate signingDate;
   @ApiModelProperty("合同到期日期")
   @TableField(
      updateStrategy = FieldStrategy.IGNORED
   )
   private LocalDate expiryDate;
   @ApiModelProperty("人员状态 1-正常 2-注销")
   private Integer custState;
   @ApiModelProperty("点赞调查批次号")
   private Long likeBatch;
   @ApiModelProperty("乐观锁")
   private Integer revision;
   @TableField(
      value = "crby",
      fill = FieldFill.INSERT
   )
   @ApiModelProperty("创建人")
   private String crby;
   @TableField(
      value = "crtime",
      fill = FieldFill.INSERT
   )
   @ApiModelProperty("创建时间")
   private LocalDateTime crtime;
   @TableField(
      value = "upby",
      fill = FieldFill.UPDATE
   )
   @ApiModelProperty("更新人")
   private String upby;
   @TableField(
      value = "uptime",
      fill = FieldFill.UPDATE
   )
   @ApiModelProperty("更新时间")
   private LocalDateTime uptime;
   @ApiModelProperty("就诊号")
   private String doctorNum;
   @ApiModelProperty("住院号")
   private String hospitalNum;
   @ApiModelProperty("医嘱")
   private String doctorInstruct;
   @ApiModelProperty("住院日期")
   private LocalDateTime hospitalDate;
   @ApiModelProperty("最近下单时间")
   private LocalDateTime orderTime;
   @ApiModelProperty("银行卡号")
   private String bankCardNum;
   @ApiModelProperty("扩展字段1(日期 yyyy-MM-dd)")
   private LocalDate extendDate;
   @ApiModelProperty("扩展字段2(日期 yyyy-MM-dd HH:mm:ss)")
   private LocalDateTime extendDateTime;
   @ApiModelProperty("扩展字段3(字符串)")
   private String extendStr1;
   @ApiModelProperty("扩展字段4(字符串)")
   private String extendStr2;
   @ApiModelProperty("婚姻状态 0-保密 1-未婚 2-已婚")
   private Integer maritalStatus;

   public CustInfo setCustPhotoUrl(String custPhotoUrl) {
      this.custPhotoUrl = SysUtil.getCutPath(custPhotoUrl);
      return this;
   }

   public CustInfo setHeadPortraitUrl(String headPortraitUrl) {
      this.headPortraitUrl = SysUtil.getCutPath(headPortraitUrl);
      return this;
   }

   public Long getId() {
      return this.id;
   }

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

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

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

   public String getCustNameLike() {
      return this.custNameLike;
   }

   public Integer getCustLimitId() {
      return this.custLimitId;
   }

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

   public String getCustDeviceId() {
      return this.custDeviceId;
   }

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

   public String getMobileSuffix() {
      return this.mobileSuffix;
   }

   public String getPwd() {
      return this.pwd;
   }

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

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

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

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

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

   public Integer getEthnicityCode() {
      return this.ethnicityCode;
   }

   public String getNativePlace() {
      return this.nativePlace;
   }

   public String getCustPhotoUrl() {
      return this.custPhotoUrl;
   }

   public String getHeadPortraitUrl() {
      return this.headPortraitUrl;
   }

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

   public String getOrgNum() {
      return this.orgNum;
   }

   public String getOrgFullName() {
      return this.orgFullName;
   }

   public Long getCostCenterId() {
      return this.costCenterId;
   }

   public Long getPlaceId() {
      return this.placeId;
   }

   public String getPlaceFullName() {
      return this.placeFullName;
   }

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

   public String getPsnTypeName() {
      return this.psnTypeName;
   }

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

   public String getQq() {
      return this.qq;
   }

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

   public String getCompanyWechat() {
      return this.companyWechat;
   }

   public String getDingtalk() {
      return this.dingtalk;
   }

   public String getAlipayOpenid() {
      return this.alipayOpenid;
   }

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

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

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

   public String getJob() {
      return this.job;
   }

   public String getJobRank() {
      return this.jobRank;
   }

   public String getJobLevel() {
      return this.jobLevel;
   }

   public String getJobTitle() {
      return this.jobTitle;
   }

   public String getJobTitleRank() {
      return this.jobTitleRank;
   }

   public String getAuthStrength() {
      return this.authStrength;
   }

   public String getPosition() {
      return this.position;
   }

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

   public LocalDate getSigningDate() {
      return this.signingDate;
   }

   public LocalDate getExpiryDate() {
      return this.expiryDate;
   }

   public Integer getCustState() {
      return this.custState;
   }

   public Long getLikeBatch() {
      return this.likeBatch;
   }

   public Integer getRevision() {
      return this.revision;
   }

   public String getCrby() {
      return this.crby;
   }

   public LocalDateTime getCrtime() {
      return this.crtime;
   }

   public String getUpby() {
      return this.upby;
   }

   public LocalDateTime getUptime() {
      return this.uptime;
   }

   public String getDoctorNum() {
      return this.doctorNum;
   }

   public String getHospitalNum() {
      return this.hospitalNum;
   }

   public String getDoctorInstruct() {
      return this.doctorInstruct;
   }

   public LocalDateTime getHospitalDate() {
      return this.hospitalDate;
   }

   public LocalDateTime getOrderTime() {
      return this.orderTime;
   }

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

   public LocalDate getExtendDate() {
      return this.extendDate;
   }

   public LocalDateTime getExtendDateTime() {
      return this.extendDateTime;
   }

   public String getExtendStr1() {
      return this.extendStr1;
   }

   public String getExtendStr2() {
      return this.extendStr2;
   }

   public Integer getMaritalStatus() {
      return this.maritalStatus;
   }

   public CustInfo setId(final Long id) {
      this.id = id;
      return this;
   }

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

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

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

   public CustInfo setCustNameLike(final String custNameLike) {
      this.custNameLike = custNameLike;
      return this;
   }

   public CustInfo setCustLimitId(final Integer custLimitId) {
      this.custLimitId = custLimitId;
      return this;
   }

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

   public CustInfo setCustDeviceId(final String custDeviceId) {
      this.custDeviceId = custDeviceId;
      return this;
   }

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

   public CustInfo setMobileSuffix(final String mobileSuffix) {
      this.mobileSuffix = mobileSuffix;
      return this;
   }

   public CustInfo setPwd(final String pwd) {
      this.pwd = pwd;
      return this;
   }

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

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

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

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

   public CustInfo setBirthday(final LocalDate birthday) {
      this.birthday = birthday;
      return this;
   }

   public CustInfo setEthnicityCode(final Integer ethnicityCode) {
      this.ethnicityCode = ethnicityCode;
      return this;
   }

   public CustInfo setNativePlace(final String nativePlace) {
      this.nativePlace = nativePlace;
      return this;
   }

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

   public CustInfo setOrgNum(final String orgNum) {
      this.orgNum = orgNum;
      return this;
   }

   public CustInfo setOrgFullName(final String orgFullName) {
      this.orgFullName = orgFullName;
      return this;
   }

   public CustInfo setCostCenterId(final Long costCenterId) {
      this.costCenterId = costCenterId;
      return this;
   }

   public CustInfo setPlaceId(final Long placeId) {
      this.placeId = placeId;
      return this;
   }

   public CustInfo setPlaceFullName(final String placeFullName) {
      this.placeFullName = placeFullName;
      return this;
   }

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

   public CustInfo setPsnTypeName(final String psnTypeName) {
      this.psnTypeName = psnTypeName;
      return this;
   }

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

   public CustInfo setQq(final String qq) {
      this.qq = qq;
      return this;
   }

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

   public CustInfo setCompanyWechat(final String companyWechat) {
      this.companyWechat = companyWechat;
      return this;
   }

   public CustInfo setDingtalk(final String dingtalk) {
      this.dingtalk = dingtalk;
      return this;
   }

   public CustInfo setAlipayOpenid(final String alipayOpenid) {
      this.alipayOpenid = alipayOpenid;
      return this;
   }

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

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

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

   public CustInfo setJob(final String job) {
      this.job = job;
      return this;
   }

   public CustInfo setJobRank(final String jobRank) {
      this.jobRank = jobRank;
      return this;
   }

   public CustInfo setJobLevel(final String jobLevel) {
      this.jobLevel = jobLevel;
      return this;
   }

   public CustInfo setJobTitle(final String jobTitle) {
      this.jobTitle = jobTitle;
      return this;
   }

   public CustInfo setJobTitleRank(final String jobTitleRank) {
      this.jobTitleRank = jobTitleRank;
      return this;
   }

   public CustInfo setAuthStrength(final String authStrength) {
      this.authStrength = authStrength;
      return this;
   }

   public CustInfo setPosition(final String position) {
      this.position = position;
      return this;
   }

   public CustInfo setEntryDate(final LocalDate entryDate) {
      this.entryDate = entryDate;
      return this;
   }

   public CustInfo setSigningDate(final LocalDate signingDate) {
      this.signingDate = signingDate;
      return this;
   }

   public CustInfo setExpiryDate(final LocalDate expiryDate) {
      this.expiryDate = expiryDate;
      return this;
   }

   public CustInfo setCustState(final Integer custState) {
      this.custState = custState;
      return this;
   }

   public CustInfo setLikeBatch(final Long likeBatch) {
      this.likeBatch = likeBatch;
      return this;
   }

   public CustInfo setRevision(final Integer revision) {
      this.revision = revision;
      return this;
   }

   public CustInfo setCrby(final String crby) {
      this.crby = crby;
      return this;
   }

   public CustInfo setCrtime(final LocalDateTime crtime) {
      this.crtime = crtime;
      return this;
   }

   public CustInfo setUpby(final String upby) {
      this.upby = upby;
      return this;
   }

   public CustInfo setUptime(final LocalDateTime uptime) {
      this.uptime = uptime;
      return this;
   }

   public CustInfo setDoctorNum(final String doctorNum) {
      this.doctorNum = doctorNum;
      return this;
   }

   public CustInfo setHospitalNum(final String hospitalNum) {
      this.hospitalNum = hospitalNum;
      return this;
   }

   public CustInfo setDoctorInstruct(final String doctorInstruct) {
      this.doctorInstruct = doctorInstruct;
      return this;
   }

   public CustInfo setHospitalDate(final LocalDateTime hospitalDate) {
      this.hospitalDate = hospitalDate;
      return this;
   }

   public CustInfo setOrderTime(final LocalDateTime orderTime) {
      this.orderTime = orderTime;
      return this;
   }

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

   public CustInfo setExtendDate(final LocalDate extendDate) {
      this.extendDate = extendDate;
      return this;
   }

   public CustInfo setExtendDateTime(final LocalDateTime extendDateTime) {
      this.extendDateTime = extendDateTime;
      return this;
   }

   public CustInfo setExtendStr1(final String extendStr1) {
      this.extendStr1 = extendStr1;
      return this;
   }

   public CustInfo setExtendStr2(final String extendStr2) {
      this.extendStr2 = extendStr2;
      return this;
   }

   public CustInfo setMaritalStatus(final Integer maritalStatus) {
      this.maritalStatus = maritalStatus;
      return this;
   }


}
