package com.cmvr.inspection.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 巡检任务日志类型枚举
 * 
 * @author cmvr-iot
 * @since 2026-06-05
 */
@Getter
@AllArgsConstructor
public enum InspectionLogTypeEnum {
    TEXT(1, "文字"),
    IMAGE(2, "图片"),
    VIDEO(3, "视频"),
    AUDIO(4, "音频");

    private final int code;
    private final String desc;

    public static InspectionLogTypeEnum fromCode(int code) {
        for (InspectionLogTypeEnum type : values()) {
            if (type.code == code) {
                return type;
            }
        }
        return null;
    }
}
