package com.gci.boot.modules.vehicles.enums;

import lombok.Getter;

public enum BacklogTabEnum {
    //1出险 2违章 3事故 4维修 5_保养台账 6年检 7_保养计划 8保险

    //出险
    INSURANCE("1","出险"),
    //违章
    VIOLATION("2","违章"),
    //事故
    ACCIDENT("3","事故"),
    //年检
    INSPECTION("6","年检"),
    //维修
    REPAIR("4","维修"),
    //保养台账
    UPKEEP_BILL("5","保养台账"),
    //保养计划
    UPKEEP_PLAN("7","保养计划"),

    INSURANCE_LEDGER("8","保险");

    /**
     * 对应值、tab名称
     */
    @Getter
    private String value;

    @Getter
    private String type;

    BacklogTabEnum(String value, String type) {
        this.value = value;
        this.type = type;
    }

    public static BacklogTabEnum getEnum(String value){
        for (BacklogTabEnum backlogEnum : BacklogTabEnum.values()) {
            if (backlogEnum.getValue().equals(value)) {
                return backlogEnum;
            }
        }
        return null;
    }
}
