package co.yixiang.yshop.module.product.convert.campaigninfo;

import java.util.*;

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

import co.yixiang.yshop.module.product.controller.admin.campaigndetail.vo.CampaignDetailRespVO;
import co.yixiang.yshop.module.product.controller.admin.campaigndetail.vo.CampaignSkuDetailRespVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import co.yixiang.yshop.module.product.controller.admin.campaigninfo.vo.*;
import co.yixiang.yshop.module.product.dal.dataobject.campaigninfo.CampaignInfoDO;

/**
 * 活动信息 Convert
 *
 * @author moxiangrong
 */
@Mapper
public interface CampaignInfoConvert {

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

    CampaignInfoDO convert(CampaignInfoCreateReqVO bean);

    CampaignInfoDO convert(CampaignInfoUpdateReqVO bean);

    CampaignInfoRespVO convert(CampaignInfoDO bean);

    @Mapping(target = "image", source = "productImage")
    @Mapping(target = "id", source = "productId")
    @Mapping(target = "storeName", source = "productName")
    @Mapping(target = "originalPrice", source = "productPrice")
    CampaignDetailRespVO convert(CampaignSkuDetailRespVO vo);

    List<CampaignInfoRespVO> convertList(List<CampaignInfoDO> list);

    PageResult<CampaignInfoPageRespVO> convertPage(PageResult<CampaignInfoDO> page);

    PageResult<CanvasCampaignPageRespVO> convertCanvasPage(PageResult<CampaignInfoDO> page);

    List<CampaignInfoExcelVO> convertList02(List<CampaignInfoDO> list);

}
