package com.zfire.jiasm.syncdata.plus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 微信用户信息
 * </p>
 *
 * @author gejiang
 * @since 2023-07-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="User对象", description="微信用户信息")
public class User extends Model<User> {

    private static final long serialVersionUID=1L;

    @TableId(value = "user_id", type = IdType.ID_WORKER_STR)
    private String userId;

    @ApiModelProperty(value = "师傅id")
    private String workerId;

    private String idCard;

    @ApiModelProperty(value = "帐号")
    private String userName;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "微信手机号")
    private String mobile;

    @ApiModelProperty(value = "微信昵称")
    private String nickName;

    @ApiModelProperty(value = "性别（未知  男  女）")
    private String sex;

    @ApiModelProperty(value = "微信用户头像")
    private String avatar;

    @ApiModelProperty(value = "微信城市")
    private String city;

    @ApiModelProperty(value = "国家")
    private String country;

    @ApiModelProperty(value = "省份")
    private String province;

    @ApiModelProperty(value = "微信的openid(小程序用户标识)")
    private String openId;

    @ApiModelProperty(value = "微信unionid（用户微信唯一标识）")
    private String unionId;

    @ApiModelProperty(value = "状态 true=正常 false=禁用")
    private Boolean status;

    @ApiModelProperty(value = "最后登录时间")
    private Date lastLoginTime;

    @ApiModelProperty(value = "最后提示保险时间")
    private Date lastInsureTime;

    @ApiModelProperty(value = "是否人脸识别通过 YES=是 NO=否")
    private String isFace;

    @ApiModelProperty(value = "人脸识别失败次数")
    private Integer faceErrNum;

    @ApiModelProperty(value = "最近1次人脸识别时间")
    private Date faceLastTime;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    private String sessionKey;

    @ApiModelProperty(value = "等待重签时间（废弃）")
    private Date waitSignTime;

    @ApiModelProperty(value = "签约结果（废弃）")
    private String signResult;

    @ApiModelProperty(value = "微信用户id")
    private String externalUserid;


    @Override
    protected Serializable pkVal() {
        return this.userId;
    }

}
