package com.sckw.core.model.enums;

import lombok.Getter;

/**
 * @author sky
 * @desc 默认地址类型
 * @date 2023/6/15
 */
@Getter
public enum BannerDistrictEnum {

    //首页
    BANNER_ZERO(0, "首页"),
    //建材市场
    BANNER_ONE(1, "建材市场"),
    //求购大厅
    BANNER_TWO(2, "求购大厅"),
    //运需广场
    BANNER_THREE(3, "运需广场"),
    //运力大厅
    BANNER_FOUR(4, "运力大厅"),
    //金融服务
    BANNER_FIVE(5, "金融服务"),
    //车后服务
    BANNER_SIX(6,"车后服务"),
    //绿智新能
    BANNER_SEVEN(7,"绿智新能");



    

    private final int code;

    private final String name;

    BannerDistrictEnum(int code, String name){
        this.code = code;
        this.name = name;
    }

    public static BannerDistrictEnum getName(int code){
        for (BannerDistrictEnum addressDefaultTypeEnum : values()) {
            if (addressDefaultTypeEnum.getCode() == code) {
                return addressDefaultTypeEnum;
            }
        }
        return null;
    }

}
