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

import cn.hanghui.outapi.platform.common.utils.Preconditions;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author shisl
 * @package cn.hanghui.outapi.platform.tenant.entity.enums
 * @class QrCodeReaderBrandEnum
 * @date 2024/3/12 下午1:21
 * @description 二维码读头品牌
 */
@AllArgsConstructor
@Getter
public enum QrCodeReaderBrandEnum {

    TB_TPS980(1, "天波TPS980内置二维码"),
    TB_D2(2, "天波D2内置二维码"),
    TB_K8(3, "天波K8内置二维码"),
    DX_OLD(4, "东信老款二维码读头"),
    DX_NEW(5, "东信新款二维码读头"),
    DX_UNION(6, "东信多合一一体式二维码"),
    XDL(7, "新大陆"),
    DX_M4500(8, "东信M4500高速二维码读头"),
    EST_M20(9, "EST-M20东信手持机二维码读头"),
    OTHER(99, "其他"),
    ;

    public static QrCodeReaderBrandEnum queryEnumByCode(Integer code) {
        if (Preconditions.isBlank(code)) {
            return null;
        }
        for (QrCodeReaderBrandEnum enumObject : values()) {
            if (enumObject.code == code.intValue()) {
                return enumObject;
            }
        }
        return null;
    }

    private int code;
    private String desc;


}
