package com.usky.eg.service.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 官方 adb 文本类命令的统一返回（与前端约定 status）
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class EgDeviceAdbResultVO {

    public static final String STATUS_SUCCESS = "SUCCESS";
    public static final String STATUS_FAIL = "FAIL";

    private String status;
    /** adb 标准输出/合并日志摘要，便于排查 */
    private String detail;

    public static EgDeviceAdbResultVO ok(String detail) {
        return new EgDeviceAdbResultVO(STATUS_SUCCESS, detail == null ? "" : detail.trim());
    }

    public static EgDeviceAdbResultVO fail(String detail) {
        return new EgDeviceAdbResultVO(STATUS_FAIL, detail == null ? "" : detail.trim());
    }
}
