package cn.com.qmth.stmms.ms.core.repository;

import cn.com.qmth.stmms.ms.core.domain.Work;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by zhengmin on 2016/10/9.
 */
public interface WorkRepo extends JpaRepository<Work,Long>{

    Work findByActiveTrue();

    Work findByName(String name);

    Work findByActiveTrueAndOrganizationId(Long organizationId);

    List<Work> findByOrganizationIdOrderByIdDesc(Long valueOf);

    List<Work> findByOrganizationId(Long organizationId);

    List<Work> findAllByActiveTrue();
}
