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

import com.xunhong.erp.turbo.api.biz.dto.common.OrderPackage;
import com.xunhong.erp.turbo.biz.infrastructure.entity.OrderPackageDO;
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 OrderPackageConvert {
	@Mapping(target = "orderPackageId", ignore = true)
	@Mapping(target = "version", ignore = true)
	@Mapping(target = "updatedAt", ignore = true)
	@Mapping(target = "isDelete", ignore = true)
	@Mapping(target = "createdAt", ignore = true)
	OrderPackageDO toOrderPackageDO(OrderPackage orderPackage);

	List<OrderPackageDO> toOrderPackageDOList(List<OrderPackage> orderPackageList);

	List<OrderPackage> toOrderPackageList(List<OrderPackageDO> orderPackageDOList);

	OrderPackage toOrderPackage(OrderPackageDO orderPackageDO);
}
