namespace EAIAdminDAL.DTO
{
/// Wire shape for POST /EAIAdmin/AnalyzeReport — replaces the Report Viewer's "AI
/// Co-Analyst" direct, unauthenticated call to 217.217.249.121:8002. RowData is the grid's
/// row array, pre-serialized to JSON by the caller (FE) — GB5 embeds it verbatim under a
/// "message" key before forwarding to gbEAI's report_analyzer agent (matches the existing
/// downstream analyzer's {message: [...]} contract, confirmed from
/// gbaicoanalyst.service.ts::loadAnalystData). ReportCode becomes gbEAI's variant_code, giving
/// each report type its own prompt (see MEAIPROMPTTEMPLATE.VariantCode).
public class EAIAnalyzeReportRequestDTO
{
public int ReportId { get; set; }
public string? ReportCode { get; set; }
public int? ReportViewId { get; set; }
public string RowData { get; set; } = string.Empty;
}
/// Wire shape for POST /EAIAdmin/AnalyzeReportChat — continues the session
/// AnalyzeReport started. Matches gbaicoanalyst.service.ts::sendMessage's existing
/// (session_id, content) shape one hop upstream, now proxied through gbEAI instead of called
/// directly.
public class EAIAnalyzeReportChatRequestDTO
{
public string SessionId { get; set; } = string.Empty;
public string Message { get; set; } = string.Empty;
}
/// Result of either call — SessionId (from the downstream analyzer, opaque to GB5,
/// pass it back on the next AnalyzeReportChat call), Analysis (summary text for
/// AnalyzeReport, chat reply text for AnalyzeReportChat), ChartBase64 (AnalyzeReport only,
/// when the analyzer returns a chart image).
public class EAIAnalyzeReportResultDTO
{
public string? SessionId { get; set; }
public string Analysis { get; set; } = string.Empty;
public string? ChartBase64 { get; set; }
}
}