package kz.konturai.parser.repository;

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

import java.util.Optional;

@Repository
public interface CampaignPredictionRepository extends MongoRepository<CampaignPrediction, String> {

    Optional<CampaignPrediction> findByCampaignIdAndIsLatestTrue(String campaignId);

    void deleteAllByCampaignId(String campaignId);
}
