package com.xindazhou.business.convert.community.banner;

import com.xindazhou.business.controller.admin.community.banner.vo.BannerRespVO;
import com.xindazhou.business.controller.admin.community.banner.vo.BannerSaveReqVO;
import com.xindazhou.business.dal.community.dataobject.banner.BannerDO;
import com.xindazhou.framework.common.pojo.PageResult;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * Banner Convert
 *
 * @author xindazhou
 */
@Mapper
public interface BannerConvert {

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

    BannerRespVO convert(BannerDO bean);

    @Mapping(target = "id", ignore = true)
    @Mapping(target = "bannerId", ignore = true)
    @Mapping(target = "status", ignore = true)
    BannerDO convert(BannerSaveReqVO bean);

    PageResult<BannerRespVO> convertPage(PageResult<BannerDO> page);

}

