package com.dne.ems.repository;

import com.dne.ems.model.Task;
import com.dne.ems.model.TaskSubmission;

import java.util.List;

public interface TaskSubmissionRepository {

    TaskSubmission save(TaskSubmission submission);

    List<TaskSubmission> findByTaskId(Long taskId);

    /**
     * Finds the most recent task submission for a given task.
     *
     * @param task The task entity to find the submission for.
     * @return The latest TaskSubmission, or null if none exists.
     */
    TaskSubmission findFirstByTaskOrderBySubmittedAtDesc(Task task);

    List<TaskSubmission> findAll();

    void deleteAll();
} 