package com.xindazhou.vehicle.convert.auth;

import com.xindazhou.framework.common.pojo.PageResult;
import com.xindazhou.vehicle.controller.admin.vehicle.vo.VehicleAuthRespVO;
import com.xindazhou.vehicle.controller.admin.vehicle.vo.VehicleAuthSaveReqVO;
import com.xindazhou.vehicle.dal.dataobject.auth.VehicleAuthDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * 车辆授权设置 Convert
 *
 * @author xindazhou
 */
@Mapper
public interface VehicleAuthConvert {

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

    VehicleAuthRespVO convert(VehicleAuthDO bean);

    @Mapping(target = "id", ignore = true)
    VehicleAuthDO convert(VehicleAuthSaveReqVO bean);

    PageResult<VehicleAuthRespVO> convertPage(PageResult<VehicleAuthDO> page);

}
