package com.social.media.application.content.query;

import com.social.media.domain.content.aggregate.Post;
import com.social.media.domain.content.valueobject.PostId;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.time.LocalDateTime;
import java.util.Optional;

/**
 * Query service for Content read operations
 */
public interface ContentQueryService {
    
    /**
     * Find content by ID
     */
    Optional<Post> findById(PostId postId);
    
    /**
     * Find all content with pagination
     */
    Page<Post> findAll(Pageable pageable);
    
    /**
     * Find content by company ID
     */
    Page<Post> findByCompanyId(Long companyId, Pageable pageable);
    
    /**
     * Find content by status
     */
    Page<Post> findByStatus(String status, Pageable pageable);
    
    /**
     * Find content by type
     */
    Page<Post> findByContentType(String contentType, Pageable pageable);
    
    /**
     * Find scheduled content
     */
    Page<Post> findScheduledContent(Pageable pageable);
    
    /**
     * Find content by date range
     */
    Page<Post> findByDateRange(LocalDateTime startDate, LocalDateTime endDate, Pageable pageable);
    
    /**
     * Find content by social account
     */
    Page<Post> findBySocialAccountId(Long socialAccountId, Pageable pageable);
}

