package kz.konturai.parser.repository;

import kz.konturai.parser.model.PostingTask;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Optional;

@Repository
public interface PostingTaskRepository extends MongoRepository<PostingTask, String> {
    List<PostingTask> findByStatusAndPublishDateLessThanEqual(String status, LocalDateTime date);
    List<PostingTask> findByStrategyId(String strategyId);
    List<PostingTask> findByUserId(String userId);
    Optional<PostingTask> findById(String id);
}

