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

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

/**
 * @author shenyifei
 */
@Mapper(componentModel = "spring", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface OrderDealerConvert {
	@Mapping(target = "version", ignore = true)
	@Mapping(target = "updatedAt", ignore = true)
	@Mapping(target = "isDelete", ignore = true)
	@Mapping(target = "createdAt", ignore = true)
	OrderDealerDO toOrderDealerDO(OrderDealer orderDealer);

	@Mapping(target = "createdByName", ignore = true)
	@Mapping(target = "createdBy", ignore = true)
	OrderDealer toOrderDealer(OrderDealerDO orderDealerDO);
}
