package com.hfkj.sysenum.gas;

import lombok.Getter;

import java.util.Objects;

@Getter
public enum GasOrderAuditStatusEnum {
    type0(0, "不可用"),
    type1(1, "审核中"),
    type2(2, "已通过"),
    type3(3, "已驳回"),
    type4(4, "渠道审核中"),
    type5(5, "渠道驳回"),
    ;

    private Integer code;

    private String name;

    GasOrderAuditStatusEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public static GasOrderAuditStatusEnum getNameByType(Integer type) {
        for (GasOrderAuditStatusEnum ele : values()) {
            if (Objects.equals(type,ele.getCode())) {
                return ele;
            }
        }
        return null;
    }
}
