package com.emotion.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.emotion.entity.Dictionary;
import com.emotion.dto.request.dictionary.DictionaryCreateRequest;
import com.emotion.dto.request.dictionary.DictionaryPageRequest;
import com.emotion.dto.request.dictionary.DictionaryUpdateRequest;
import com.emotion.dto.response.dictionary.DictionaryResponse;
import com.emotion.common.PageResult;
import com.emotion.common.Result;

import java.util.List;

/**
 * 字典Service接口
 * 
 * @author huazhongmin
 * @date 2025-12-22
 */
public interface DictionaryService extends IService<Dictionary> {

    /**
     * 创建字典
     * 
     * @param request 创建请求
     * @return 创建结果
     */
    Result<DictionaryResponse> createDictionary(DictionaryCreateRequest request);

    /**
     * 更新字典
     * 
     * @param request 更新请求
     * @return 更新结果
     */
    Result<DictionaryResponse> updateDictionary(DictionaryUpdateRequest request);

    /**
     * 删除字典
     * 
     * @param id 字典ID
     * @return 删除结果
     */
    Result<Void> deleteDictionary(String id);

    /**
     * 获取字典详情
     * 
     * @param id 字典ID
     * @return 字典详情
     */
    Result<DictionaryResponse> getDictionary(String id);

    /**
     * 分页查询字典
     * 
     * @param request 分页请求
     * @return 分页结果
     */
    Result<PageResult<DictionaryResponse>> listDictionaries(DictionaryPageRequest request);

    /**
     * 根据字典类型查询字典集合
     * 
     * @param dictType 字典类型
     * @return 字典集合
     */
    Result<List<DictionaryResponse>> getDictionariesByType(String dictType);

    /**
     * 根据字典类型查询启用的字典集合
     * 
     * @param dictType 字典类型
     * @return 启用的字典集合
     */
    Result<List<DictionaryResponse>> getEnabledDictionariesByType(String dictType);
}