package com.xindazhou.vehicle.convert.vehicle;

import com.xindazhou.vehicle.api.dto.VehicleRespDTO;
import com.xindazhou.vehicle.dal.dataobject.vehicle.VehicleDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 车辆 Convert
 *
 * @author xindazhou
 */
@Mapper
public interface VehicleConvert {

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

    @org.mapstruct.Mapping(target = "name", source = "nickname")
    VehicleRespDTO convert(VehicleDO bean);

    List<VehicleRespDTO> convertList(List<VehicleDO> list);

}

