package com.xindazhou.vehicle.convert.guide;

import com.xindazhou.framework.common.pojo.PageResult;
import com.xindazhou.vehicle.controller.admin.vehicle.vo.VehicleGuideRespVO;
import com.xindazhou.vehicle.controller.admin.vehicle.vo.VehicleGuideSaveReqVO;
import com.xindazhou.vehicle.dal.dataobject.guide.VehicleGuideDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * 使用指南 Convert
 *
 * @author xindazhou
 */
@Mapper
public interface VehicleGuideConvert {

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

    VehicleGuideRespVO convert(VehicleGuideDO bean);

    @Mapping(target = "id", ignore = true)
    @Mapping(target = "onShelfTime", ignore = true)
    @Mapping(target = "offShelfTime", ignore = true)
    VehicleGuideDO convert(VehicleGuideSaveReqVO bean);

    PageResult<VehicleGuideRespVO> convertPage(PageResult<VehicleGuideDO> page);

}
