package com.hfkj.sysenum.gas;

import java.util.Objects;

/**
 *  任务执行方式
 * @className: GasOilPriceStatusEnum
 * @author: HuRui
 * @date: 2024/3/15
 **/
public enum GasOilPriceTaskExecutionTypeEnum {
    type1(1, "立刻执行"),
    type2(2, "定时执行"),
    ;

    private Integer number;

    private String name;

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

    public static GasOilPriceTaskExecutionTypeEnum getNameByType(Integer type) {
        for (GasOilPriceTaskExecutionTypeEnum 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;
    }
}
