package com.infoepoch.pms.agent.platform.agent.application.dto;

import com.infoepoch.pms.agent.platform.agent.domain.Agent;
import lombok.Getter;

import java.time.LocalDateTime;

/**
 * 智能体列表响应 DTO（不含字段定义）。
 */
@Getter
public class AgentSummaryResponse {

    private final String id;
    private final String name;
    private final String description;
    private final String systemPrompt;
    private final String submitUrl;
    private final String modelConfigId;
    private final boolean enabled;
    private final LocalDateTime createdAt;
    private final LocalDateTime updatedAt;

    public AgentSummaryResponse(Agent agent) {
        this.id = agent.getId();
        this.name = agent.getName();
        this.description = agent.getDescription();
        this.systemPrompt = agent.getSystemPrompt();
        this.submitUrl = agent.getSubmitUrl();
        this.modelConfigId = agent.getModelConfig() != null ? agent.getModelConfig().getId() : agent.getModelConfigId();
        this.enabled = agent.isEnabled();
        this.createdAt = agent.getCreatedAt();
        this.updatedAt = agent.getUpdatedAt();
    }
}
