package com.cool.modules.aiconfig.entity;

import com.cool.core.base.BaseEntity;
import com.cool.core.annotation.ColumnDefine;
import com.mybatisflex.annotation.Table;
import lombok.Getter;
import lombok.Setter;

/**
 * AI模型接口配置实体类
 */
@Getter
@Setter
@Table(value = "ai_api_config", comment = "AI模型接口配置表")
public class AiApiConfigEntity extends BaseEntity<AiApiConfigEntity> {

    @ColumnDefine(comment = "关联模型ID", notNull = true)
    private Long modelId;

    @ColumnDefine(comment = "接口地址", notNull = true, length = 500)
    private String apiUrl;

    @ColumnDefine(comment = "API密钥", length = 500)
    private String apiKey;

    @ColumnDefine(comment = "API密钥名称（如：Authorization、api-key等）", length = 100)
    private String apiKeyName;

    @ColumnDefine(comment = "请求方法（GET/POST等）", defaultValue = "POST")
    private String requestMethod;

    @ColumnDefine(comment = "请求头配置（JSON格式）", type = "text")
    private String requestHeaders;

    @ColumnDefine(comment = "请求体格式（JSON格式）", type = "text")
    private String requestBodyFormat;

    @ColumnDefine(comment = "响应数据解析路径（JSONPath格式）", length = 500)
    private String responseDataPath;

    @ColumnDefine(comment = "超时时间（秒）", defaultValue = "60")
    private Integer timeout;

    @ColumnDefine(comment = "状态 0-禁用 1-启用", defaultValue = "1")
    private Integer status;

    @ColumnDefine(comment = "备注")
    private String remark;
}
