package com.jeesharp.business.modules.mall.convert;

import com.jeesharp.business.modules.mall.dto.MallSpuSaveDTO;
import com.jeesharp.business.modules.mall.entity.MallSpu;
import com.jeesharp.business.modules.mall.vo.MallSpuInfoVO;
import com.jeesharp.business.modules.mall.vo.MallSpuListVO;
import com.jeesharp.business.modules.mall.vo.MallSpuQueryVO;
import com.jeesharp.framework.common.pojo.convert.BasePojoConvert;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * 商品SPU转换器
 */
@Mapper
public interface MallSpuConvert extends BasePojoConvert<MallSpu, MallSpuSaveDTO, MallSpuInfoVO, MallSpuListVO, MallSpuQueryVO> {

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

    @Mapping(target = "extAttrs", ignore = true)
    MallSpuInfoVO toInfoVO(MallSpu entity);
}
