package com.nisum.myteam.repository;


import com.nisum.myteam.model.dao.Resource;
import com.nisum.myteam.model.dao.ResourceAllocation;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface ResourceAllocationRepo
        extends MongoRepository<ResourceAllocation, String> {

    List<ResourceAllocation> findByProjectId(String projectId);

    List<ResourceAllocation> findByEmployeeId(String employeeId);

    ResourceAllocation findById(ObjectId id);

    List<ResourceAllocation> findByEmployeeIdAndProjectId(String employeeId, String projectId);

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

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

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

}
