package com.emoon.knowledge.domain.bo;

import com.emoon.common.core.validate.validate.AddGroup;
import com.emoon.common.core.validate.validate.EditGroup;
import com.emoon.common.mybatis.core.domain.BaseEntity;
import com.emoon.knowledge.domain.ThinkAgent;
import com.emoon.knowledge.domain.ThinkApi;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * API配置业务对象 ai_api
 *
 * @author wangkang
 * @date 2025-11-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = ThinkApi.class, reverseConvertGenerate = false)
public class ThinkApiBo extends BaseEntity {

    /**
     * 主键
     */
    private Long id;

    /**
     * API名称
     */
    @JsonProperty("name")
    @NotBlank(message = "API名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String mcp;

    /**
     * 简介
     */
    @JsonProperty("introduce")
    private String mcpintroduce;

    /**
     * 输出数据
     */
    @JsonProperty("outputData")
    private String mcpOutdata;

    /**
     * 输入数据
     */
    @JsonProperty("inputData")
    private String mcpIndata;

    /**
     * 请求地址
     */
    @JsonProperty("url")
    @NotBlank(message = "请求地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String mcpUrl;

    /**
     * 排序规则
     */
    private Integer sort;

    /**
     * 智能体ID
     */
    private Long agentId;

    /**
     * 状态：0-正常；1-禁用
     */
    private Integer status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 所属智能体（兼容旧字段）
     */
    private String agent;

    /**
     * 0为删除，1为未删除（兼容旧字段）
     */
    private Long state;

}



