package com.mosty.base.enums;

import lombok.Getter;

/**
 * 布控数据库厂商
 */
@Getter
public enum BKCSTypeEnum {
    DAHUA("大华","dahua","DaHuaService",true),
    HAIKANG("海康","haikang","HaiKangService",true),
    ;

    private  String name;
    private  String value;
    private  String beanName;
    private  boolean enable;

    private BKCSTypeEnum(String name, String value, String beanName, boolean enable){
        this.name = name;
        this.value =value;
        this.enable = enable;
        this.beanName = beanName;
    }

    /**
     * 根据值转换为枚举类型
     * @param value
     * @return
     */
    public  static BKCSTypeEnum toValue(String value){
        for (BKCSTypeEnum _tmp : BKCSTypeEnum.values()){
            if(value.toLowerCase().equals(_tmp.getValue())){
                return  _tmp;
            }
        }
        return  null;
    }
}
