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

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

@Getter
@AllArgsConstructor
public enum PushConfigEnum {

    /**
     * 推送地址配置
     * heartTrackingUrl 设备状态推送地址
     */

    HEART_TRACKING_URL("HEART_TRACKING_URL", "设备状态推送地址"),
    ;

    private String code;
    private String desc;

    public static PushConfigEnum findByCode(String code) {
        if (Preconditions.isBlank(code)) {
            return null;
        }
        for (PushConfigEnum enumObject : values()) {
            if (enumObject.code.equals(code)) {
                return enumObject;
            }
        }
        return null;
    }

}
