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 HhFacePushConfigEnum {

    HEART_TRACKING_URL("HEART_TRACKING_URL", "设备状态推送地址"),
    TRANSIT_PUSH_URL("TRANSIT_PUSH_URL", "进出记录推送地址"),
    IN_OUT_FILTER_REPEAT_TIME("IN_OUT_FILTER_REPEAT_TIME", "进出记录滤重时间(0~1200s)"),
    ;

    private String code;
    private String desc;

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

}
