package com.seer.teach.teacher.controller.app;

import com.seer.teach.common.ResultBean;
import com.seer.teach.common.annotation.DecryptionAnnotation;
import com.seer.teach.common.annotation.EncryptionAnnotation;
import com.seer.teach.common.annotation.LogPrint;
import com.seer.teach.teacher.common.req.AiReportReq;
import com.seer.teach.teacher.common.resp.AiReportResp;
import com.seer.teach.teacher.service.ReportService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/app/report")
@RestController
@Tag(name = "APP - 报告")
@EncryptionAnnotation
@DecryptionAnnotation
@RequiredArgsConstructor
public class ReportController {

    private final ReportService reportService;

    @PostMapping("/getReport")
    @LogPrint
    @Operation(summary = "获取Ai报告")
    public ResultBean<AiReportResp> getReport(@RequestBody @Validated AiReportReq params) {
        AiReportResp result = reportService.getReport(params);
        return ResultBean.success(result);
    }
}
