package com.dne.ems.repository;

import java.util.Collection;
import java.util.List;
import java.util.Optional;

import com.dne.ems.model.Feedback;
import com.dne.ems.model.Task;
import com.dne.ems.model.enums.TaskStatus;

public interface TaskRepository {

    Optional<Task> findById(Long id);

    List<Task> findAll();

    Task save(Task task);

    List<Task> saveAll(Iterable<Task> tasks);

    void deleteById(Long id);

    long count();

    boolean existsById(Long id);

    void deleteAll();
    
    Optional<Task> findByFeedback(Feedback feedback);

    long countByStatus(TaskStatus status);

    long countByAssigneeIdAndStatusIn(Long assigneeId, Collection<TaskStatus> statuses);

    List<Task> findByAssigneeIdAndStatus(Long assigneeId, TaskStatus status);
} 