package com.sckw.fleet.model.enums;

import lombok.Getter;

/**
 * @author zk
 * @desc 车辆排放标准类型
 * @date 2024/3/8 0008
 */
@Getter
public enum TruckEevEnum {
    /**
     * 国四
     */
    GUO_SI(1, "国四"),
    /**
     * 国五
     */
    GUO_WU(1, "国五"),

    /**
     * 国六
     */
    GUO_LIU(1, "国六")

    ;


    private final Integer code;
    private final String name;

    TruckEevEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getName(Integer code) {
        for (TruckEevEnum entity : TruckEevEnum.values()) {
            if (entity.getCode().equals(code)) {
                return entity.getName();
            }
        }
        return null;
    }
}
