package com.social.media.service;

import com.social.media.dto.PostDto;
import com.social.media.domain.shared.PageResponse;
import com.social.media.domain.entity.Post;

import java.time.LocalDateTime;
import java.util.List;

public interface PostService {
    
    PageResponse<PostDto> getAllPosts(int page, int size);
    
    PostDto getPostById(Long id);
    
    PostDto getPostByPostCode(String postCode);
    
    PostDto createPost(PostDto postDto);
    
    PostDto updatePost(Long id, PostDto postDto);
    
    void deletePost(Long id);
    
    PageResponse<PostDto> getPostsByCompany(Long companyId, int page, int size);
    
    PageResponse<PostDto> getPostsByAuthor(Long authorId, int page, int size);
    
    PageResponse<PostDto> getPostsByStatus(Post.PostStatus status, int page, int size);
    
    PageResponse<PostDto> getPostsByType(Post.PostType postType, int page, int size);
    
    PageResponse<PostDto> getPostsByCompanyAndStatus(Long companyId, Post.PostStatus status, int page, int size);
    
    PageResponse<PostDto> getPinnedPosts(Long companyId, int page, int size);
    
    PostDto publishPost(Long id);
    
    PostDto schedulePost(Long id, LocalDateTime scheduledTime);
    
    PostDto pinPost(Long id);
    
    PostDto unpinPost(Long id);
    
    List<PostDto> getScheduledPostsForExecution();
    
    PageResponse<PostDto> searchPosts(Long companyId, String searchTerm, int page, int size);
    
    PageResponse<PostDto> getPopularPosts(Long companyId, int page, int size);
    
    Long getTotalEngagement(Long companyId);
    
    Long getPostCount(Long companyId);
    
    Long getPostCountByStatus(Long companyId, Post.PostStatus status);
    
    // Legacy methods for backward compatibility
    PostDto getPostById(String id);
    
    PostDto updatePost(String id, PostDto postDto);
    
    void deletePost(String id);
    
    PageResponse<PostDto> getPostsByPlatform(String platform, int page, int size);
    
    PageResponse<PostDto> getPostsByStatus(String status, int page, int size);
}
