package ai.decompile.analysis.model.dto;

import ai.decompile.analysis.model.entity.LibrarySymbol;
import java.util.UUID;
import lombok.NonNull;

public record LibrarySymbolResponse(
    UUID id,
    String moduleName,
    String className,
    String symbolName,
    int ordinal,
    String symbolType,
    String parameters,
    String category) {

  public static LibrarySymbolResponse from(@NonNull LibrarySymbol sym) {
    return new LibrarySymbolResponse(
        sym.getId(),
        sym.getModuleName(),
        sym.getClassName(),
        sym.getSymbolName(),
        sym.getOrdinal(),
        sym.getSymbolType(),
        sym.getParameters(),
        sym.getCategory());
  }
}
