package cn.com.qmth.stmms.biz.exam.service;

import cn.com.qmth.stmms.biz.exam.model.Exam;
import cn.com.qmth.stmms.biz.exam.query.ExamSearchQuery;
import cn.com.qmth.stmms.biz.mark.model.PictureConfigItem;
import cn.com.qmth.stmms.common.enums.ExamStatus;
import cn.com.qmth.stmms.common.enums.ExamType;
import cn.com.qmth.stmms.common.enums.ObjectiveStatus;

import java.util.Date;
import java.util.List;

public interface ExamService {

    Exam save(Exam exam);

    Exam findById(Integer id);

    void updateSliceConfig(Integer id, List<PictureConfigItem> configList);

    ExamSearchQuery findByQuery(ExamSearchQuery query);

    List<Exam> findBySchoolIdAndTypeAndStatus(Integer schoolId, ExamType type);

    List<Exam> findBySchoolId(Integer schoolId);

    Exam findBySchoolAndCode(Integer schoolId, String code);

    List<Exam> findByMarkerUserId(Integer userId, Date time);

    List<Exam> findBySubjectHeaderUserId(Integer schoolId, Integer userId);

    int updateObjectiveStatus(int examId, ObjectiveStatus calculate);

    void updateStatus(Integer id, ExamStatus status);

    List<Exam> findBySchoolViewUserId(Integer schoolId, Integer userId);

    int updateExamUpdateTime(int examId);
}
