package com.yeejoin.amos.boot.module.ugp.api.Enum;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 流程是否同意
 */
@Getter
@AllArgsConstructor
public enum WhetherItPassEnum {

    PASS("1", "通过"),
    REJECT("0", "驳回"),
    SAVE("2", "保存");

    private final String code;
    private final String name;

    public String getCode() {
        return code;
    }
    public String getName() {
        return name;
    }

    public static String getTypeByCode(String code){
        for (WhetherItPassEnum constants : values()) {
            if (constants.getCode().equals(code)) {
                return constants.getName();
            }
        }
        return null;
    }
}
