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

import cn.com.qmth.examcloud.core.questions.dao.entity.Course;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.repository.query.QueryByExampleExecutor;

import java.util.List;

/**
 * Created by songyue on 16/12/26.
 */
public interface CourseRepo extends MongoRepository<Course, String>, QueryByExampleExecutor<Course> {

    Course findFirstByCodeAndOrgId(String code, String orgId);

    Course findFirstByCode(String courseNo);

    List<Course> findByOrgId(String orgId);

}