package cn.pluss.platform.vo;

import cn.pluss.platform.entity.MerchantChannelStatus;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 进件记录vo
 * @author djh
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ChannelStatusVO extends MerchantChannelStatus {

    /**
     * 是否具备快速到账的权限
     */
    @TableField(exist = false)
    private Boolean hasQuickCash;

    /**
     * 签约链接
     */
    @TableField(exist = false)
    private String signUrl;

    public String getSignUrl() {
        JSONObject extra = getExtra();
        if (signUrl != null) {
            return signUrl;
        }

        if (extra != null) {
            signUrl = extra.getString("signUrl");
        }

        return signUrl;
    }
}
