package org.dromara.common.web.core;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.mapstruct.MapperConfig;

import java.util.List;

@MapperConfig
public interface BaseConverter<V,B,T> {
    /**
     * dto转vo
     * @param t
     * @return
     */
     public V toVO(T t);

    /**
     * dto列表转vo
     *
     * @param tList
     * @return
     */
    public List<V> toVO(List<T> tList);
    /**
     * dto分页转vo
     * @param tPage
     * @return
     */
    public Page<V> toVO(Page<T> tPage);




    /**
     * dto转po
     * @param d
     * @return
     */
    public T toPo(B d);




}
