package com.zioinfo.cms.ugc.mapper;

import com.zioinfo.cms.ugc.CmsUgc;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UgcMapper {
    List<CmsUgc> findAll(@Param("ugcType") String ugcType,
                         @Param("moderationStatus") String moderationStatus,
                         @Param("targetContentId") Long targetContentId);
    CmsUgc findById(@Param("id") Long id);
    List<CmsUgc> findApprovedReviews(@Param("targetRef") String targetRef);
    int insert(CmsUgc u);
    int updateModeration(@Param("id") Long id, @Param("status") String status,
                         @Param("aiRisk") Double aiRisk, @Param("aiReason") String aiReason);
    int updateSentiment(@Param("id") Long id, @Param("sentiment") String sentiment);
    int updateSrId(@Param("id") Long id, @Param("srId") String srId);
    int delete(@Param("id") Long id);
}
