package com.jwipc.api.constant;

import lombok.Getter;

/**
 * <p> </p>
 *
 * @author 邓京术
 * @version 1.0
 * @since JDK 1.8
 */
@Getter
public enum ShareStatus {
    PASS(0, "同意"),
    REFUSE(1, "拒绝"),//1资产请款为审批中
    RUNNING(2, "审批中"),//资产请款为拒绝驳回
    DISCARDED(3, "废弃"),
    WAIT_PAY(4, "待付款"),
    PAY_PART(5, "部分付款"),
    PAY_SUCCESS(6, "付款成功"),
    PAY_FAIL(7, "付款失败"),
    PAY_END(8, "终止付款");
    ;
    private final int status;
    private final String title;

    ShareStatus(int status, String title) {
        this.status = status;
        this.title = title;
    }

    public static ShareStatus forVal(int status) {
        for (ShareStatus value : values()) {
            if (value.getStatus() == status) {
                return value;
            }
        }
        return null;
    }
}
