package cn.pluss.platform.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

/**
 * <p>
 * 子渠道工单信息表, 微信商户认证信息表(目前只有微信需要认证)
 * </p>
 *
 * @author Djh
 * @since 2020-08-31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_pluss_sub_merchant_apply_order")
public class SubMerchantApplyOrder implements Serializable {

    /**
     * 商户未进件成功
     */
    public static final String STATUS_NO_AUDIT = "-2";

    /**
     * 商户暂未发起微信认证
     */
    public static final String STATUS_NO_WX_AUDIT = "-1";

    /**
     * 审核中
     */
    public static final String RES_STATUS_REVIEW = "0";

    /**
     * 待授权
     */
    public static final String RES_STATUS_SUCCESS = "1";

    /**
     * 认证失败
     */
    public static final String RES_STATUS_FAILED = "2";

    /**
     * 认证完成
     */
    public static final String RES_STATUS_COMPLETE = "3";

    /**
     * 发起认证报错的状态
     */
    public static final String RES_STATUS_COMMIT_ERROR = "4";

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 商户code
     */
    @TableField("merchantCode")
    private String merchantCode;

    @TableField(exist = false)
    private String merchantId;

    /**
     * 通道渠道id， merchant_channel表的id
     */
    @TableField("channelId")
    private Integer channelId;

    /**
     * 子渠道类别
     */
    @TableField("subMchType")
    private String subMchType;

    /**
     * 子渠道申请工单
     */
    @TableField("applyNo")
    private String applyNo;

    /**
     * 状态，0：未处理；1，已处理；2，已取消； 3, 错误
     */
    private String status;

    /**
     * 激活二维码链接
     */
    @TableField("infoQrcode")
    private String infoQrcode;

    /**
     * 工单处理结果
     */
    @TableField("resultStatus")
    private String resultStatus;

    /**
     * 驳回原因等
     */
    private String remark;

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

    /**
     * 更新时间
     */
    @TableField(value = "updateTime", fill = FieldFill.INSERT_UPDATE, update = "now()")
    private Date updateTime;

}