package com.jwipc.api.constant;

import lombok.Getter;

/**
 * <p> </p>
 *
 * @author 邓京术
 * @version 1.0
 * @since JDK 1.8
 */
@Getter
public enum ShareContractStatus {
    TEMPOR(0, "暂存"),
    SUBMIT(1, "待提交"),
    RUNNING(2, "审批中"),
    PASS(3, "通过"),
    REFUSE(4, "驳回"),
    END(7, "终止"),
    END_REFUSE(8, "终止驳回"),
    ;
    private final int status;
    private final String title;

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

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