package com.social.media.application.socialaccount.query;

import com.social.media.domain.socialaccount.aggregate.SocialAccount;
import com.social.media.domain.socialaccount.valueobject.SocialAccountId;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Optional;

/**
 * Query service for SocialAccount read operations
 */
public interface SocialAccountQueryService {
    
    /**
     * Find social account by ID
     */
    Optional<SocialAccount> findById(SocialAccountId socialAccountId);
    
    /**
     * Find all social accounts with pagination
     */
    Page<SocialAccount> findAll(Pageable pageable);
    
    /**
     * Find social accounts by company ID
     */
    Page<SocialAccount> findByCompanyId(Long companyId, Pageable pageable);
    
    /**
     * Find social accounts by social network ID
     */
    Page<SocialAccount> findBySocialNetworkId(Long socialNetworkId, Pageable pageable);
    
    /**
     * Find social accounts by active status
     */
    Page<SocialAccount> findByIsActive(boolean isActive, Pageable pageable);
    
    /**
     * Find social accounts by username
     */
    Optional<SocialAccount> findByUsername(String username);
    
    /**
     * Check if username exists
     */
    boolean existsByUsername(String username);
}

