#pragma once

#include <softbus_api/ExecuteCommand.h>

#include <chrono>
#include <string>

namespace softbus::command {

enum class CommandState {
    Created,
    Validated,
    Dispatched,
    Delivered,
    Executing,
    Succeeded,
    Failed,
    Timeout,
    Rejected,
    Cancelled
};

struct CommandContext {
    std::string requestId;
    softbus::api::ExecuteCommand command;
    CommandState state{CommandState::Created};
    std::string error;
    double executedValue{0.0};
    std::chrono::steady_clock::time_point createdAt{std::chrono::steady_clock::now()};
};

std::string commandStateToString(CommandState state);

} // namespace softbus::command
