package com.xindazhou.vehicle.convert.gallery;

import com.xindazhou.framework.common.pojo.PageResult;
import com.xindazhou.vehicle.controller.admin.vehicle.vo.VehicleGalleryRespVO;
import com.xindazhou.vehicle.dal.dataobject.gallery.VehicleGalleryDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * 车辆图库 Convert
 *
 * @author xindazhou
 */
@Mapper
public interface VehicleGalleryConvert {

    VehicleGalleryConvert INSTANCE = Mappers.getMapper(VehicleGalleryConvert.class);

    @Mapping(target = "imageCount", ignore = true)
    VehicleGalleryRespVO convert(VehicleGalleryDO bean);

    PageResult<VehicleGalleryRespVO> convertPage(PageResult<VehicleGalleryDO> page);

}
