package com.xindazhou.business.service.community.sensitive;

import com.xindazhou.business.controller.admin.community.sensitive.vo.SensitiveWordPageReqVO;
import com.xindazhou.business.controller.admin.community.sensitive.vo.SensitiveWordRespVO;
import com.xindazhou.business.controller.admin.community.sensitive.vo.SensitiveWordSaveReqVO;

import jakarta.validation.Valid;

/**
 * 敏感词 Service 接口
 *
 * @author xindazhou
 */
public interface SensitiveWordService {

    /**
     * 创建敏感词
     *
     * @param createReqVO 创建信息
     * @return 编号
     */
    Long createSensitiveWord(@Valid SensitiveWordSaveReqVO createReqVO);

    /**
     * 更新敏感词
     *
     * @param updateReqVO 更新信息
     */
    void updateSensitiveWord(@Valid SensitiveWordSaveReqVO updateReqVO);

    /**
     * 删除敏感词
     *
     * @param id 编号
     */
    void deleteSensitiveWord(Long id);

    /**
     * 获得敏感词
     *
     * @param id 编号
     * @return 敏感词
     */
    SensitiveWordRespVO getSensitiveWord(Long id);

    /**
     * 获得敏感词分页
     *
     * @param pageReqVO 分页查询
     * @return 敏感词分页
     */
    com.xindazhou.framework.common.pojo.PageResult<SensitiveWordRespVO> getSensitiveWordPage(SensitiveWordPageReqVO pageReqVO);

    /**
     * 过滤敏感词
     *
     * @param text 原始文本
     * @return 过滤后的文本，如果包含禁用词则返回null
     */
    String filterSensitiveWord(String text);

}

