package com.hfkj.sysenum.gas;

import lombok.Getter;

import java.util.Objects;

/**
 * @className: GasOilPriceWeekEnum
 * @author: HuRui
 * @date: 2024/7/29
 **/
@Getter
public enum GasOilPriceWeekEnum {
    week1(1, "星期一"),
    week2(2, "星期二"),
    week3(3, "星期三"),
    week4(4, "星期四"),
    week5(5, "星期五"),
    week6(6, "星期六"),
    week7(7, "星期天"),
            ;

    private Integer number;

    private String name;

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

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