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

import com.xunhong.erp.turbo.api.biz.dto.common.OrderCost;
import com.xunhong.erp.turbo.biz.infrastructure.entity.OrderCostDO;
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 OrderCostConvert {
	@Mapping(target = "orderCostId", ignore = true)
	@Mapping(target = "version", ignore = true)
	@Mapping(target = "updatedAt", ignore = true)
	@Mapping(target = "isDelete", ignore = true)
	@Mapping(target = "createdAt", ignore = true)
	OrderCostDO toOrderCostDO(OrderCost orderCost);

	List<OrderCostDO> toOrderCostDOList(List<OrderCost> orderCostList);

	List<OrderCost> toOrderCostList(List<OrderCostDO> orderCostDOList);

	OrderCost toOrderCost(OrderCostDO orderCostDO);
}
