package cn.com.qmth.examcloud.core.questions.service;

import cn.com.qmth.examcloud.api.commons.security.bean.User;
import cn.com.qmth.examcloud.core.questions.dao.entity.Paper;
import cn.com.qmth.examcloud.core.questions.dao.entity.PaperDetail;
import cn.com.qmth.examcloud.core.questions.dao.entity.PaperDetailUnit;

import java.util.List;

public interface PaperDetailService {
    /**
     * 根据Id获得对应所有小题
     *
     * @param id
     * @return
     */
    public List<PaperDetailUnit> getUnitsByPaperDetailId(String id);

    /**
     * 按ID查询大题
     *
     * @param id
     * @return
     */
    public PaperDetail findById(String id);

    /**
     * 保存大题
     *
     * @param pd
     * @return
     */
    public PaperDetail savePaperDetail(PaperDetail pd, String paperId, User user);

    /**
     * 删除大题
     *
     * @param id
     * @return
     */
    public void deletePaperDetail(String paperId,String id,User user);

    /**
     * 查询同一个试卷对象对应大题
     *
     * @param paper
     * @return
     */
    public List<PaperDetail> getPaperDetailsByPaper(Paper paper);

    /**
     * 删除试卷大题
     *
     * @param paper
     */
    public void deletePaperDetailsByPaper(Paper paper);

    /**
     * 批量删除试卷大题
     *
     * @param papers
     */
    public void deletePaperDetailsByPapers(List<Paper> papers);

	public void movePaperDetail(String paperId, String detailId, String vc, User user);
}
