package com.jwipc.api.constant;

import lombok.Getter;

@Getter
public enum DeductionStatus {
    //action 事件
    NEW_BUILD(0, "新建"),
    OA_AUDIT(1, "OA审批中"),
    OA_REFUSE(2, "OA审批拒绝"),
    COMPLATE(3, "完成"),
    PURCHASE_CONFIRM(4, "待采购确认"),
    REFUSE(5, "驳回"),
    SUPPLIER_CONFIRM(6, "待供方确认"),


    ;
    private final int status;
    private final String title;

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

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