package com.usky.ai.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

@Data
public class EdgeAppControllerReplyDTO {
    @JsonProperty("BoardId")
    private String boardId;
    @JsonProperty("BoardIp")
    private String boardIp;
    @JsonProperty("Event")
    private String event = "/alg_media_config"; // 固定值
    @JsonProperty("MediaName")
    private String mediaName;
    @JsonProperty("Result")
    private Result result;

    private long time = System.currentTimeMillis();

    @Data
    public static class Result {
        @JsonProperty("Code")
        private Integer code;
        @JsonProperty("Desc")
        private String desc;
    }

    public boolean isSuccess() {
        return result != null && Integer.valueOf(0).equals(result.code);
    }
}
