package com.bonus.canteen.core.customer.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.bonus.canteen.core.common.encrypt.LeNiuDecryptDataProcess;
import com.bonus.canteen.core.common.encrypt.LeNiuDecryptField;
import com.bonus.canteen.core.common.encrypt.SM4EncDecHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

@TableName(
   value = "cust_acc_temp",
   autoResultMap = true
)
@ApiModel("人员账户临时表(为设备推送数据使用)")
@LeNiuDecryptDataProcess
@Data
public class CustAccTemp extends Model<CustAccTemp> {
   private static final long serialVersionUID = 1L;
   @TableId
   @ApiModelProperty("主键自增")
   private Long id;
   @ApiModelProperty("人员id")
   private Long custId;
   @ApiModelProperty("人员编号")
   private String custNum;
   @ApiModelProperty("人员姓名")
   @TableField(
      value = "cust_name",
      typeHandler = SM4EncDecHandler.class
   )
   @LeNiuDecryptField
   private String custName;
   @ApiModelProperty("人员限制id")
   private Integer custLimitId;
   @ApiModelProperty("手机号")
   @TableField(
           value = "mobile",
           typeHandler = SM4EncDecHandler.class
   )
   @LeNiuDecryptField
   private String mobile;
   @ApiModelProperty("身份证号")
   @TableField(
           value = "id_card",
           typeHandler = SM4EncDecHandler.class
   )
   @LeNiuDecryptField
   private String idCard;
   @ApiModelProperty("性别 1-男 2-女")
   private Integer sex;
   @ApiModelProperty("年龄")
   private Integer age;
   @ApiModelProperty("生日")
   private LocalDate birthday;
   @ApiModelProperty("人脸照片地址")
   private String custPhotoUrl;
   @ApiModelProperty("所属组织id")
   private Long orgId;
   @ApiModelProperty("机构编号(商户自定义)")
   private String orgNum;
   @ApiModelProperty("机构全称")
   private String orgFullName;
   @ApiModelProperty("所属位置")
   private Long placeId;
   @ApiModelProperty("位置编号(商户自定义)")
   private String placeNum;
   @ApiModelProperty("位置全称")
   private String placeFullName;
   @ApiModelProperty("人员类别")
   private Integer psnType;
   @ApiModelProperty("家庭地址")
   private String homeAddr;
   @ApiModelProperty("人员状态 1-正常 2-注销")
   private Integer custState;
   @ApiModelProperty("卡号")
   private Integer cardNum;
   @ApiModelProperty("卡序列号 物理卡号")
   private String serialNum;
   @ApiModelProperty("卡类型")
   private Integer cardType;
   @ApiModelProperty("三方人员编号")
   private String custThirdId;
   @ApiModelProperty("卡状态 1-正常 4-挂失")
   private Integer cardStatus;
   @ApiModelProperty("账户状态 1正常  2冻结  3销户")
   private Integer accStatus;
   @ApiModelProperty("支付宝签约号")
   private String alipayContractNum;
   @ApiModelProperty("预留字段1")
   private String reserved1;
   @ApiModelProperty("预留字段2")
   private String reserved2;
   @ApiModelProperty("预留字段3")
   private String reserved3;
   @ApiModelProperty("乐观锁")
   private Integer revision;
   @ApiModelProperty("创建人")
   @TableField(
           value = "crby",
           fill = FieldFill.INSERT
   )
   private String crby;
   @ApiModelProperty("创建时间")
   private LocalDateTime crtime;
   @ApiModelProperty("更新人")
   @TableField(
           value = "upby",
           fill = FieldFill.UPDATE
   )
   private String upby;
   @JsonFormat(
           pattern = "yyyy-MM-dd HH:mm:ss.SSS"
   )
   @ApiModelProperty("更新时间")
   private LocalDateTime uptime;

   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 Integer getCustLimitId() {
      return this.custLimitId;
   }

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

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

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

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

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

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

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

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

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

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

   public String getPlaceNum() {
      return this.placeNum;
   }

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

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

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

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

   public Integer getCardNum() {
      return this.cardNum;
   }

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

   public Integer getCardType() {
      return this.cardType;
   }

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

   public Integer getCardStatus() {
      return this.cardStatus;
   }

   public Integer getAccStatus() {
      return this.accStatus;
   }

   public String getAlipayContractNum() {
      return this.alipayContractNum;
   }

   public String getReserved1() {
      return this.reserved1;
   }

   public String getReserved2() {
      return this.reserved2;
   }

   public String getReserved3() {
      return this.reserved3;
   }

   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 CustAccTemp setId(final Long id) {
      this.id = id;
      return this;
   }

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

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

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

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

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

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

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

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

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

   public CustAccTemp setCustPhotoUrl(final String custPhotoUrl) {
      this.custPhotoUrl = custPhotoUrl;
      return this;
   }

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

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

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

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

   public CustAccTemp setPlaceNum(final String placeNum) {
      this.placeNum = placeNum;
      return this;
   }

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

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

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

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

   public CustAccTemp setCardNum(final Integer cardNum) {
      this.cardNum = cardNum;
      return this;
   }

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

   public CustAccTemp setCardType(final Integer cardType) {
      this.cardType = cardType;
      return this;
   }

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

   public CustAccTemp setCardStatus(final Integer cardStatus) {
      this.cardStatus = cardStatus;
      return this;
   }

   public CustAccTemp setAccStatus(final Integer accStatus) {
      this.accStatus = accStatus;
      return this;
   }

   public CustAccTemp setAlipayContractNum(final String alipayContractNum) {
      this.alipayContractNum = alipayContractNum;
      return this;
   }

   public CustAccTemp setReserved1(final String reserved1) {
      this.reserved1 = reserved1;
      return this;
   }

   public CustAccTemp setReserved2(final String reserved2) {
      this.reserved2 = reserved2;
      return this;
   }

   public CustAccTemp setReserved3(final String reserved3) {
      this.reserved3 = reserved3;
      return this;
   }

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

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

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

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

   @JsonFormat(
           pattern = "yyyy-MM-dd HH:mm:ss.SSS"
   )
   public CustAccTemp setUptime(final LocalDateTime uptime) {
      this.uptime = uptime;
      return this;
   }

   public String toString() {
      Long var10000 = this.getId();
      return "CustAccTemp(id=" + var10000 + ", custId=" + this.getCustId() + ", custNum=" + this.getCustNum() + ", custName=" + this.getCustName() + ", custLimitId=" + this.getCustLimitId() + ", mobile=" + this.getMobile() + ", idCard=" + this.getIdCard() + ", sex=" + this.getSex() + ", age=" + this.getAge() + ", birthday=" + String.valueOf(this.getBirthday()) + ", custPhotoUrl=" + this.getCustPhotoUrl() + ", orgId=" + this.getOrgId() + ", orgNum=" + this.getOrgNum() + ", orgFullName=" + this.getOrgFullName() + ", placeId=" + this.getPlaceId() + ", placeNum=" + this.getPlaceNum() + ", placeFullName=" + this.getPlaceFullName() + ", psnType=" + this.getPsnType() + ", homeAddr=" + this.getHomeAddr() + ", custState=" + this.getCustState() + ", cardNum=" + this.getCardNum() + ", serialNum=" + this.getSerialNum() + ", cardType=" + this.getCardType() + ", custThirdId=" + this.getCustThirdId() + ", cardStatus=" + this.getCardStatus() + ", accStatus=" + this.getAccStatus() + ", alipayContractNum=" + this.getAlipayContractNum() + ", reserved1=" + this.getReserved1() + ", reserved2=" + this.getReserved2() + ", reserved3=" + this.getReserved3() + ", revision=" + this.getRevision() + ", crby=" + this.getCrby() + ", crtime=" + String.valueOf(this.getCrtime()) + ", upby=" + this.getUpby() + ", uptime=" + String.valueOf(this.getUptime()) + ")";
   }



}
