package co.yixiang.yshop.module.shop.convert.popup;

import java.util.*;

import co.yixiang.yshop.framework.common.pojo.PageResult;

import co.yixiang.yshop.module.shop.controller.admin.popup.param.PopupCheckParam;
import co.yixiang.yshop.module.shop.controller.app.popup.vo.PopupInfoRespVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import co.yixiang.yshop.module.shop.controller.admin.popup.vo.*;
import co.yixiang.yshop.module.shop.dal.dataobject.popup.PopupDO;

/**
 * 弹窗 Convert
 *
 * @author moxiangrong
 */
@Mapper
public interface PopupConvert {

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

    PopupDO convert(PopupCreateReqVO bean);

    PopupInfoRespVO convert1(PopupDO bean);

    PopupDO convert(PopupUpdateReqVO bean);

    @Mapping(target = "popupId", source = "id")
    PopupCheckParam convertParam(PopupDO popupDO);

    PopupRespVO convert(PopupDO bean);

    List<PopupRespVO> convertList(List<PopupDO> list);

    PageResult<PopupRespVO> convertPage(PageResult<PopupDO> page);

}
