package com.jwipc.supplier.constant;

import lombok.Getter;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Getter
public enum ChangeVersionOaType {
    NONE(0, "无"),
    FINANCE(1, "财务"),
    QUALITY(2, "质量"),
    FINANCE_AND_QUALITY(3, "财务和质量"),
    ;
    private final int type;
    private final String label;

    ChangeVersionOaType(int type, String label) {
        this.type = type;
        this.label = label;
    }

    public static ChangeVersionOaType forValue(int type) {
        for (ChangeVersionOaType value : ChangeVersionOaType.values()) {
            if (value.getType() == type) {
                return value;
            }
        }
        return null;
    }
}
