package io.reactivesw.order.order.application.model.mapper;

import io.reactivesw.order.cart.application.model.LineItem;
import io.reactivesw.order.order.domain.entity.value.LineItemValue;

import java.util.List;

/**
 * Created by Davis on 17/2/7.
 */
public final class LineItemMapper {
  /**
   * Instantiates a new Line item mapper.
   */
  private LineItemMapper() {
  }

  /**
   * Model to entity list.
   *
   * @param models the models
   * @return the list
   */
  public static List<LineItemValue> modelToEntity(List<LineItem> models) {
    return null;
  }
}

@@ -561,11 +561,1062 @@
 ull;%0A  %7D
+%0A%0A  /**%0A   * Model to entity line item value.%0A   *%0A   * @param model the model%0A   * @return the line item value%0A   */%0A  public static LineItemValue modelToEntity(LineItem model) %7B%0A    LineItemValue entity = new LineItemValue();%0A%0A    // TODO: 17/2/7%0A    entity.setProductId(model.getProductId());%0A    entity.setName(null);%0A    entity.setProductSlug(null);%0A    entity.setVariant(null);%0A    entity.setPrice(null);%0A    entity.setTaxedPrice(null);%0A    entity.setTotalPrice(null);%0A    entity.setQuantity(model.getQuantity());%0A    entity.setState(null);%0A    entity.setTaxRate(null);%0A%0A    String supplyChannel = model.getSupplyChannel() == null ? null : model.getSupplyChannel()%0A        .getId();%0A    entity.setSupplyChannel(supplyChannel);%0A%0A    String distributionChannel = model.getDistributionChannel() == null ? null : model%0A        .getDistributionChannel().getId();%0A    entity.setDistributionChannel(distributionChannel);%0A%0A    entity.setDiscountedPriceForQuantity(null);%0A    entity.setPriceMode(null);%0A    entity.setCustom(null);%0A%0A    return entity;%0A  %7D
 %0A%7D%0A

edit LineItemMapper