package com.muchinfo.mtp3pojos.entity;

import com.baomidou.mybatisplus.annotation.IdType;
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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 用户三方登录信息表
 * </p>
 *
 * @author XKF
 * @since 2024-07-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("USERAUTHINFO")
@ApiModel(value="Userauthinfo对象", description="用户三方登录信息表")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Userauthinfo extends Model<Userauthinfo> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "三方认证IID - 手机号时存储加密串")
    private String authid;

    @ApiModelProperty(value = "三方认证类型 - 1:微信 2:支付宝 3:手机号 4:管理员账号")
    @TableField("AUTHTYPE")
    private Integer authtype;

    @ApiModelProperty(value = "登陆账号")
    @TableField("LOGINID")
    private Long loginid;

    @ApiModelProperty(value = "用户ID")
    @TableField("USERID")
    private Long userid;

    @ApiModelProperty(value = "三方认证I昵称")
    @TableField("AUTHNAME")
    private String authname;

    @ApiModelProperty(value = "是否有效 - 0:无效 1:有效")
    @TableField("ISVALID")
    private Integer isvalid;

    @TableField(select = false)
    private String bindname;
    @TableField(select = false)
    private String opentype;

    @Override
    public Serializable pkVal() {
        return this.authid;
    }

}
