package com.xunhong.erp.turbo.biz.infrastructure.convert;

import com.xunhong.erp.turbo.api.biz.dto.common.OrderCostItem;
import com.xunhong.erp.turbo.biz.infrastructure.entity.OrderCostItemDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.NullValueCheckStrategy;

import java.util.List;

/**
 * @author shenyifei
 */
@Mapper(componentModel = "spring", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface OrderCostItemConvert {
	@Mapping(target = "orderCostItemId", ignore = true)
	@Mapping(target = "version", ignore = true)
	@Mapping(target = "updatedAt", ignore = true)
	@Mapping(target = "isDelete", ignore = true)
	@Mapping(target = "createdAt", ignore = true)
	OrderCostItemDO toOrderCostItemDO(OrderCostItem orderCostItem);

	List<OrderCostItemDO> toOrderCostItemDOList(List<OrderCostItem> orderCostItemList);

	List<OrderCostItem> toOrderCostItemList(List<OrderCostItemDO> orderCostItemDOList);

	OrderCostItem toOrderCostItem(OrderCostItemDO orderCostItemDO);
}
