package cn.hanghui.outapi.platform.tenant.entity.enums;

import cn.hutool.core.util.StrUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author shisl
 * @package cn.hanghui.outapi.platform.tenant.entity.enums
 * @class UserOutputModeEnum
 * @date 2024/2/28 上午9:31
 * @description
 */
@AllArgsConstructor
@Getter
public enum UserOutputModeEnum {

    NO_OUTPUT("NoOutput", "不输出"),
    READER_ANALOG_SIGNAL("AnalogSignal", "阅读器模拟信号"),
    ;

    public static UserOutputModeEnum getEnumByCode(String code){
        if(StrUtil.isBlank(code)){
            return null;
        }
        for (UserOutputModeEnum enumObject : values()){
            if(enumObject.code.equals(code)){
                return enumObject;
            }
        }
        return null;
    }
    private String code;
    private String desc;



}
