package com.muchinfo.mtp3pojos.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.muchinfo.mtp3common.EncryptAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

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

/**
 * <p>
 * 用户信息表
 * </p>
 *
 * @author XKF
 * @since 2024-06-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("USERINFO")
@ApiModel(value="Userinfo对象", description="用户信息表")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Userinfo extends Model<Userinfo> {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "用户信息类型 - 1:个人  2:企业")
    @TableField("USERINFOTYPE")
    private Integer userinfotype;

    @ApiModelProperty(value = "客户名称(企业名称)")
    @TableField("CUSTOMERNAME")
    private String customername;

    @ApiModelProperty(value = "用户状态 - 1:正常 2:注销 3:停用")
    @TableField("USERSTATUS")
    private Integer userstatus;

    @ApiModelProperty(value = "账户类型 -  1:交易所 2:机构 3:会员子机构 4:经纪人 5:投资者 6:客户 7:企业成员(云平台)")
    @TableField("USERTYPE")
    private Integer usertype;

    @ApiModelProperty(value = "开户方式 -  1:管理端开户 2:网上开户注册(会员官网) 3:微信开户 4:网页交易端注册 5:安卓手机端注册 6:苹果手机端注册 7:PC交易端注册 8:微信快速开户 9:支付宝快速开户 10:手机号快速开户")
    @TableField("OPENMODE")
    private Integer openmode;

    @ApiModelProperty(value = "证件类型ID")
    @TableField("CARDTYPEID")
    private Integer cardtypeid;

    @ApiModelProperty(value = "证件号码(加密存储)")
    @TableField("CARDNUM")
    @EncryptAnnotation
    private String cardnum;

    @ApiModelProperty(value = "半身照地址")
    @TableField("HALFBODYPHOTOURL")
    private String halfbodyphotourl;

    @ApiModelProperty(value = "证件正面图片地址")
    @TableField("CARDFRONTPHOTOURL")
    private String cardfrontphotourl;

    @ApiModelProperty(value = "证件背面图片地址")
    @TableField("CARDBACKPHOTOURL")
    private String cardbackphotourl;

    @ApiModelProperty(value = "企业性质( 企业) - 1:国有控股企业 2:集体控股企业 3:私人控股企业 4:港澳台商控股企业 5:外商控股企业 6:其它")
    @TableField("BIZNATURE")
    private Integer biznature;

    @ApiModelProperty(value = "企业经营范围(企业)")
    @TableField("BIZSCOPE")
    private String bizscope;

    @ApiModelProperty(value = "法人姓名(企业)")
    @TableField("LEGALPERSONNAME")
    private String legalpersonname;

    @ApiModelProperty(value = "联系人")
    @TableField("CONTACTNAME")
    private String contactname;

    @ApiModelProperty(value = "用户性别  0: 女  1: 男 ")
    @TableField("SEX")
    private Integer sex;

    @ApiModelProperty(value = "联系电话(加密存储)")
    @TableField("TELPHONE")
    @EncryptAnnotation
    private String telphone;

    @ApiModelProperty(value = "手机号码(加密存储)")
    @TableField("MOBILE")
    @EncryptAnnotation
    private String mobile;

    @ApiModelProperty(value = "传真(加密存储)")
    @TableField("FAX")
    private String fax;

    @ApiModelProperty(value = "邮件(加密存储)")
    @TableField("EMAIL")
    @EncryptAnnotation
    private String email;

    @ApiModelProperty(value = "QQ(加密存储")
    @TableField("QQ")
    @EncryptAnnotation
    private String qq;

    @ApiModelProperty(value = "微信(加密存储)")
    @TableField("WECHAT")
    @EncryptAnnotation
    private String wechat;

    @ApiModelProperty(value = "国家")
    @TableField("COUNTRYID")
    private Long countryid;

    @ApiModelProperty(value = "省")
    @TableField("PROVINCEID")
    private Long provinceid;

    @ApiModelProperty(value = "市")
    @TableField("CITYID")
    private Long cityid;

    @ApiModelProperty(value = "地区")
    @TableField("DISTRICTID")
    private Long districtid;

    @ApiModelProperty(value = "公司(个人)")
    @TableField("COMPANY")
    private String company;

    @ApiModelProperty(value = "地址")
    @TableField("ADDRESS")
    private String address;

    @ApiModelProperty(value = "邮政编码")
    @TableField("POSTALCODE")
    private String postalcode;

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATETIME")
    private Date createtime;

    @ApiModelProperty(value = "创建人")
    @TableField("CREATORID")
    private Long creatorid;

    @ApiModelProperty(value = "修改时间")
    @TableField("MODIFIERTIME")
    private Date modifiertime;

    @ApiModelProperty(value = "修改人")
    @TableField("MODIFIERID")
    private Long modifierid;

    @ApiModelProperty(value = "备注")
    @TableField("REMARK")
    private String remark;

    @ApiModelProperty(value = "开户申请信息(JSON)")
    @TableField("WSKHINFO")
    private String wskhinfo;

    @ApiModelProperty(value = "签约pdf文件")
    @TableField("SIGNPDFURL")
    private String signpdfurl;

    @ApiModelProperty(value = "法人身份证正面照地址")
    @TableField("LEGALCARDFRONTPHOTOURL")
    private String legalcardfrontphotourl;

    @ApiModelProperty(value = "法人身份证背面照地址")
    @TableField("LEGALCARDBACKPHOTOURL")
    private String legalcardbackphotourl;

    @ApiModelProperty(value = "其它图片地址[使用分号分隔]")
    @TableField("OTHERURL")
    private String otherurl;

    @ApiModelProperty(value = "数据是否已加密 - 0:未加密 1:已加密")
    @TableField("HASENCRYPT")
    private Integer hasencrypt;

    @ApiModelProperty(value = "银行名称 - 无值")
    @TableField("BANKNAME")
    private String bankname;

    @ApiModelProperty(value = "银行帐号 (加密存储)")
    @TableField("BANKACCOUNT")
    @EncryptAnnotation
    private String bankaccount;

    @ApiModelProperty(value = "银行卡正面照地址")
    @TableField("BANKCARDFRONTPHOTOURL")
    private String bankcardfrontphotourl;

    @ApiModelProperty(value = "是否需要发票 - 0:不需要 1:需要")
    @TableField("NEEDINVOICE")
    private Integer needinvoice;

    @ApiModelProperty(value = "银行编码")
    @TableField("BANKID")
    private String bankid;

    @ApiModelProperty(value = "附件1")
    @TableField("ATTACHMENT1")
    private String attachment1;

    @ApiModelProperty(value = "附件2")
    @TableField("ATTACHMENT2")
    private String attachment2;

    @ApiModelProperty(value = "收款人名称")
    @TableField("BANKACCOUNTNAME")
    private String bankaccountname;

    @ApiModelProperty(value = "头像地址")
    @TableField("HEADURL")
    private String headurl;

    @ApiModelProperty(value = "昵称：默认为名称脱敏(张**) 或 手机号脱敏(139****9999)")
    @TableField("NICKNAME")
    private String nickname;

    @ApiModelProperty(value = "手机号码[明文-尚志]")
    @TableField("MOBILE2")
    private String mobile2;

    @ApiModelProperty(value = "企业类型 - 1:进口/生产 2:销售 3:零售 4:运输 5:仓储")
    @TableField("BIZTYPE")
    private Integer biztype;

    @ApiModelProperty(value = "授权委托书")
    @TableField("PROXYSTATEMENTURL")
    private String proxystatementurl;

    @ApiModelProperty(value = "联系人证件正面图片地址")
    @TableField("CONTACTCARDFRONTPHOTOURL")
    private String contactcardfrontphotourl;

    @ApiModelProperty(value = "联系人证件背面图片地址")
    @TableField("CONTACTCARDBACKPHOTOURL")
    private String contactcardbackphotourl;

    @ApiModelProperty(value = "附件3")
    @TableField("ATTACHMENT3")
    private String attachment3;

    @ApiModelProperty(value = "附件4")
    @TableField("ATTACHMENT4")
    private String attachment4;

    @ApiModelProperty(value = "附件5")
    @TableField("ATTACHMENT5")
    private String attachment5;

    @ApiModelProperty(value = "纳税人识别号")
    @TableField("TAXPAYERNUM")
    private String taxpayernum;

    @ApiModelProperty(value = "生日(个人:年月日)")
    @TableField("BIRTHDAY")
    private Date birthday;

    @ApiModelProperty(value = "修改来源 - 1:管理端 2:终端")
    @TableField("MODIFYSRC")
    private Integer modifysrc;

    @ApiModelProperty(value = "登录代码")
    @TableField("LOGINCODE")
    private String logincode;

    @TableField(select = false)
    private BigDecimal creditquota;

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

}
