package com.pavis.admin.aigc.model.resp;

import cn.crane4j.annotation.AssembleMethod;
import cn.crane4j.annotation.ContainerMethod;
import com.pavis.admin.aigc.mapper.ToolMapper;
import com.pavis.admin.aigc.model.entity.ToolDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 智能体和工具关联信息
 *
 * @author semi
 * @since 2025/05/26 17:28
 */
@Data
@Schema(description = "智能体和工具关联信息")
public class AgentToolResp implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 智能体工具关联ID
     */
    @Schema(description = "智能体工具关联ID")
    private Long id;

    /**
     * 智能体ID
     */
    @Schema(description = "智能体ID")
    private Long agentId;

    /**
     * 工具ID
     */
    @AssembleMethod(targetType = ToolMapper.class, method = @ContainerMethod(bindMethod = "selectById", resultType = ToolDO.class), prop = ":tool")
    @Schema(description = "工具ID")
    private Long toolId;

    /**
     * 工具详情
     */
    @Schema(description = "工具详情")
    private ToolDO tool;
}