package com.sonic.shark.service;

import com.amazonaws.services.rekognition.model.ModerationLabel;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sonic.shark.domain.bo.NsfwRecognitionResult;
import com.sonic.shark.domain.entity.NsfwConfig;
import com.sonic.shark.enums.S3BucketNameEnum;

import java.util.List;
import java.util.Map;

/**
 * @author code
 */
public interface NsfwConfigService extends IService<NsfwConfig> {

    /**
     * 图片鉴黄
     * @param s3BucketNameEnum
     * @param fileFullPath
     * @return
     */
    NsfwRecognitionResult nsfwRecognition(S3BucketNameEnum s3BucketNameEnum, String fileFullPath);

    /**
     * 图片鉴黄
     * @param s3BucketNameEnum
     * @param fileFullPath
     * @param versionType
     * @return
     */
    NsfwRecognitionResult nsfwRecognition(S3BucketNameEnum s3BucketNameEnum, String fileFullPath, String versionType);


    /**
     * 鉴黄校验
     * @param labelList
     * @param versionType
     * @return
     */
    Boolean checkNsfw(List<ModerationLabel> labelList, String versionType);


    /**
     * 根据类型列表获取类型对应的分值
     * @param categoryList
     * @param versionType
     * @return
     */
    Map<String, Float> getScore(List<String> categoryList, String versionType);

}
