package com.muchinfo.mtp3pojos.entity;

import com.baomidou.mybatisplus.annotation.*;
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;
import java.util.Date;

/**
 * <p>
 * 用户变更表
 * </p>
 *
 * @author XKF
 * @since 2024-07-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("DRAFT_USERACCOUNT_NEW")
@ApiModel(value="DraftUseraccountNew对象", description="用户变更表")
@AllArgsConstructor
@NoArgsConstructor
@Builder
@KeySequence(value = "SEQ_DRAFT_USERACCOUNT")
public class DraftUseraccountNew extends Model<DraftUseraccountNew> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "autoid")
    @TableId(value="autoid")
    private Long autoid;

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

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

    @ApiModelProperty(value = "账户名称(机构名称)")
    @TableField("ACCOUNTNAME")
    private String accountname;

    @ApiModelProperty(value = "所属机构ID")
    @TableField("PARENTUSERID")
    private Long parentuserid;

    @ApiModelProperty(value = "所属经纪人ID")
    @TableField("BROKER")
    private Long broker;

    @ApiModelProperty(value = "子机构层级路径(逗号分隔,首尾加逗号)")
    @TableField("SUBAREALEVELPATH")
    private String subarealevelpath;

    @ApiModelProperty(value = "推荐人ID")
    @TableField("REFEREEUSERID")
    private Long refereeuserid;

    @ApiModelProperty(value = "所属会员ID")
    @TableField("MEMBERUSERID")
    private Long memberuserid;

    @ApiModelProperty(value = "账户状态 -  1:待激活 2:待审核 3:待复核 4:正常 5:审核拒绝 6:已注销")
    @TableField("ACCOUNTSTATUS")
    private Integer accountstatus;

    @ApiModelProperty(value = "默认结算资金账号ID(机构分润使用) /投资者-外部关联的子账户")
    @TableField("RECKONACCOUNTID")
    private Long reckonaccountid;

    @ApiModelProperty(value = "变更状态 1 未变更 2 变更中 3 变更待审核 4 变更待复核(投资者)")
    @TableField("MODIFYSTATUS")
    private Integer modifystatus;

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

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

    @ApiModelProperty(value = "审核时间")
    @TableField("AUDITTIME")
    private Date audittime;

    @ApiModelProperty(value = "审核人")
    @TableField("AUDITUSERID")
    private Long audituserid;

    @ApiModelProperty(value = "审核备注")
    @TableField("AUDITREMARK")
    private String auditremark;

    @ApiModelProperty(value = "销户时间")
    @TableField("CANCELTIME")
    private Date canceltime;

    @ApiModelProperty(value = "销户人")
    @TableField("CANCELUSERID")
    private Long canceluserid;

    @ApiModelProperty(value = "修改时间")
    @TableField("MODIFYTIME")
    private Date modifytime;

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

    @ApiModelProperty(value = "变更备注")
    @TableField("MODIFYREMARK")
    private String modifyremark;

    @ApiModelProperty(value = "旧JSON内容")
    @TableField("OLDCONTENT")
    private String oldcontent;

    @ApiModelProperty(value = "新JSON内容")
    @TableField("NEWCONTENT")
    private String newcontent;

    @TableField(exist = false)
    private Integer hasauth;

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

}
