package cn.iocoder.mall.product.application.convert;

import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.product.api.bo.ProductCategoryBO;
import cn.iocoder.mall.product.application.vo.users.UsersProductCategoryVO;
import cn.iocoder.mall.product.application.vo.admins.AdminsProductCategoryTreeNodeVO;
import cn.iocoder.mall.product.application.vo.admins.AdminsProductCategoryVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface ProductCategoryConvert {

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

    @Mappings({})
    UsersProductCategoryVO convertToVO(ProductCategoryBO category);

    List<UsersProductCategoryVO> convertToVO(List<ProductCategoryBO> categoryList);

    AdminsProductCategoryTreeNodeVO convert(ProductCategoryBO category);

    CommonResult<AdminsProductCategoryVO> convert(CommonResult<ProductCategoryBO> result);

}