package kz.konturai.parser.repository;

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

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

@Repository
public interface MarketingStrategyRepository extends MongoRepository<MarketingStrategy, String> {
    Optional<MarketingStrategy> findById(String id);
    Optional<MarketingStrategy> findFirstByAnalysisIdOrderByCreatedAtDesc(String analysisId);
    List<MarketingStrategy> findByUserIdOrderByCreatedAtDesc(String userId);
    List<MarketingStrategy> findByUserIdAndAnalysisId(String userId, String analysisId);
}

