package com.nisum.mytime.repository;

import java.util.List;

import org.bson.types.ObjectId;
import org.springframework.data.mongodb.repository.MongoRepository;

import com.nisum.mytime.model.ProjectTeamMate;

public interface ProjectTeamMatesRepo
        extends MongoRepository<ProjectTeamMate, String> {

    List<ProjectTeamMate> findByProjectId(String projectId);

    List<ProjectTeamMate> findByManagerId(String projectId);
    
    List<ProjectTeamMate> findByManagerIds(String managerId);

    List<ProjectTeamMate> findByEmployeeId(String employeeId);

    ProjectTeamMate findById(ObjectId id);

    ProjectTeamMate findByEmployeeIdAndManagerId(String employeeId,
            String managerId);

    ProjectTeamMate findByEmployeeIdAndProjectId(String employeeId,
            String projectId);

    List<ProjectTeamMate> findByEmployeeIdAndActive(String employeeId,
            boolean status);

    List<ProjectTeamMate> findByEmployeeIdAndProjectIdAndActive(
            String employeeId, String projectId, boolean status);

    List<ProjectTeamMate> findByAccountAndActiveAndBillableStatus(
            String account, boolean status, String billableStatus);

}
