package com.keao.edu.user.service.impl;

import com.keao.edu.common.dal.BaseDAO;
import com.keao.edu.common.service.impl.BaseServiceImpl;
import com.keao.edu.user.dao.ExamSubjectDao;
import com.keao.edu.user.dto.ExamSubjectDto;
import com.keao.edu.user.entity.ExamSubject;
import com.keao.edu.user.entity.Subject;
import com.keao.edu.user.service.ExamSubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ExamSubjectServiceImpl extends BaseServiceImpl<Long, ExamSubject> implements ExamSubjectService {
	
	@Autowired
	private ExamSubjectDao examSubjectDao;

	@Override
	public BaseDAO<Long, ExamSubject> getDAO() {
		return examSubjectDao;
	}

    @Override
    public List<ExamSubjectDto> getExamSubjects(Integer ExamId) {
		return examSubjectDao.getSubjectWithExamId(ExamId);
    }

	@Override
	public List<Subject> getUnRelatedWithExamSubjects(Integer tenantId, Integer examId) {
		return examSubjectDao.getUnRelatedWithExamSubjects(tenantId, examId);
	}
}
