package com.hfkj.sysenum.gas;

import java.util.Objects;

/**
 * @className: GasOilPriceStatusEnum
 * @author: HuRui
 * @date: 2024/3/5
 **/
public enum GasOilPriceStatusEnum {
    status0(0, "删除"),
    status1(1, "正常"),
    status2(2, "禁用"),
    ;

    private Integer number;

    private String name;

    GasOilPriceStatusEnum(int number, String name) {
        this.number = number;
        this.name = name;
    }

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

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
