package com.xunhong.erp.turbo.infra.app.assembler;

import com.xunhong.erp.turbo.api.infra.dto.vo.MaterialVO;
import com.xunhong.erp.turbo.infra.domain.entity.Material;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.NullValueCheckStrategy;

/**
 * @author shenyifei
 */
@Mapper(componentModel = "spring", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface MaterialAssembler {

	@Mapping(target = "categoryVO", source = "category")
	@Mapping(target = "url", ignore = true)
	MaterialVO toMaterialVO(Material material);
}
