package com.chaozhanggui.system.lkl.model;

import lombok.Data;

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

@Data
public class MerchantChannelStatusVO implements Serializable {


    //审核中
    public static final String AUDIT_STATUS_EXAMINING = "1";

    //三方审核中
    public static final String AUDIT_THIRD_STATUS_WAITING = "-100";


    /**
     * 审核通过
     */
    public static final String AUDIT_STATUS_SUCCESS = "3";

    public static final String AUDIT_STATUS_DATA_EDIT = "6";

    /**
     * 秒审通过
     */
    public static final String AUDIT_STATUS_FIRST_TRIAL_SUCCESS = "4";

    private Integer id;

    private Integer channel;

    private String merchantcode;

    private String merchantid;

    private String settlementtype;

    private String status;

    private String thirdstatus;

    private String remark;

    private Date createtime;

    private Date updatetime;

    private String applicationid;

    private String callbackstatus;

    private Integer valid;

    private String authorizationstatus;

    private String mercname;

    private String virchannelflag;

    private String virstatusflag;

    private String srcmerchantno;

    private String interfaceversion;

    private String aliauthorizationstatus;

    private String wxcerturl;

    private String alicerturl;

    private Date auditsuccesstime;

    private String extra;



    public static boolean isAudited(MerchantChannelStatusVO mcs) {
        if (mcs == null) {
            return false;
        }

        return MerchantChannelStatusVO.AUDIT_STATUS_SUCCESS.equals(mcs.getStatus()) ||
                MerchantChannelStatusVO.AUDIT_STATUS_DATA_EDIT.equals(mcs.getStatus()) ||
                MerchantChannelStatusVO.AUDIT_STATUS_FIRST_TRIAL_SUCCESS.equals(mcs.getStatus());
    }
}
