package com.emotion.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.emotion.common.PageResult;
import com.emotion.dto.request.community.CommunityPostCreateRequest;
import com.emotion.dto.request.community.CommunityPostUpdateRequest;
import com.emotion.dto.request.community.CommunityPostPageRequest;
import com.emotion.dto.response.community.CommunityPostResponse;
import com.emotion.entity.CommunityPost;

/**
 * 社区帖子服务接口
 * 
 * @author huazhongmin
 * @date 2025-07-23
 */
public interface CommunityPostService extends IService<CommunityPost> {
    
    /**
     * 分页查询帖子
     */
    PageResult<CommunityPostResponse> getPage(CommunityPostPageRequest request);
    
    /**
     * 根据ID获取帖子响应
     */
    CommunityPostResponse getById(String id);

    /**
     * 创建帖子
     */
    CommunityPostResponse create(CommunityPostCreateRequest request);

    /**
     * 更新帖子
     */
    CommunityPostResponse update(CommunityPostUpdateRequest request);

    /**
     * 删除帖子
     */
    boolean delete(String id);
}