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

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

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

	@Mapping(target = "count", ignore = true)
	@Mapping(target = "children", ignore = true)
	CategoryVO toCategoryVO(Category category);
}
