package de.assecutor.votianlt.repository;

import de.assecutor.votianlt.model.task.BaseTask;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface TaskRepository extends MongoRepository<BaseTask, ObjectId> {
    List<BaseTask> findByJobIdOrderByTaskOrderAsc(ObjectId jobId);

    // Deprecated - use findByJobIdOrderByTaskOrderAsc instead
    @Deprecated
    default List<BaseTask> findByJobId(ObjectId jobId) {
        return findByJobIdOrderByTaskOrderAsc(jobId);
    }
}
