package cn.lihongjie.coal.dictionary.mapper;

import cn.lihongjie.coal.base.mapper.BaseMapper;
import cn.lihongjie.coal.dictionary.dto.*;
import cn.lihongjie.coal.dictionary.entity.DictionaryEntity;

import org.mapstruct.Mapper;
import org.mapstruct.MappingConstants;
import org.mapstruct.control.DeepClone;

@Mapper(
        componentModel = MappingConstants.ComponentModel.SPRING,
        uses = {cn.lihongjie.coal.base.mapper.CommonMapper.class, cn.lihongjie.coal.base.mapper.CommonEntityMapper.class},
        mappingControl = DeepClone.class)
public interface DictionaryMapper
        extends BaseMapper<
                DictionaryEntity, DictionaryDto, CreateDictionaryDto, UpdateDictionaryDto> {
    DictionaryDetailedDto toDetailedDto(DictionaryEntity entity);

    DictionaryTreeDto toDictTree(DictionaryEntity dict);
}
