package com.jwipc.api.constant;

import lombok.Getter;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Getter
public enum OaStatus {
    PASS(0, "同意"),
    REFUSE(1, "拒绝"),
    RUNNING(2, "审批中"),
    DISCARDED(3, "废弃");
    ;
    private final int status;
    private final String title;

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

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