package ${currentPackage};

import ${package.Entity}.*;
#foreach($pkg in ${customModuleFilePackages})
import ${pkg}.*;
#end
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * $!{table.comment} 内部对象转换器
 *
 * @author ${author}
 * @version ${version}
 * @since ${date}
 */
@Mapper
public interface ${type}Convert {

    ${type}Convert MAPPER = Mappers.getMapper(${type}Convert.class);

    ${type}DO to(${type}CreateRequest request);

    ${type}DO to(${type}UpdateRequest request);

    ${type}DO to(${type}QueryRequest request);

    ${type}VO to(${type}DO domain);

    List<${type}VO> to(List<${type}DO> list);

    #if($meta.enableCache)
    ${type}VO to(${type}CacheDTO cache);

    ${type}CacheDTO toCache(${type}DO domain);

    #end
}
