package top.tqx.demo_1.service;

import top.tqx.demo_1.common.PageResult;
import top.tqx.demo_1.dto.QuestionCreateRequest;
import top.tqx.demo_1.dto.QuestionStatsRequest;
import top.tqx.demo_1.dto.QuestionStatsResponse;
import top.tqx.demo_1.dto.QuestionUpdateRequest;
import top.tqx.demo_1.entity.Question;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface QuestionService extends IService<Question> {

    String uploadAndProcessFile(MultipartFile file, String user, String customFileName) throws IOException;

    boolean saveQuestion(Question question);

    Question getByQuestionId(String questionId);

    boolean updateReviewStatus(String questionId, String status, String reviewerComment);

    PageResult<Question> pageQuestions(Integer pageNum, Integer pageSize,
                                       String questionType, Integer difficulty, String status);

    List<Question> getPendingQuestions();

    Question createQuestion(QuestionCreateRequest request);

    Question updateQuestion(Long id, QuestionUpdateRequest request);

    boolean deleteById(Long id);

    int batchDelete(List<Long> ids);

    List<Question> listQuestions(String questionType, Integer difficulty, String status, String documentName, Integer limit, Long userId, Long deptId, Integer userType);

    QuestionStatsResponse getQuestionStats(QuestionStatsRequest request);
}
