package com.freemud.sdk.api.assortment.shoppingcart.util;

import com.freemud.sdk.api.assortment.shoppingcart.constant.ActivityChannelEnum;
import com.freemud.sdk.api.assortment.shoppingcart.constant.CreateOrderType;

import java.util.Objects;

public class PropertyConvertUtil {

    public static ActivityChannelEnum orderTypeConvert2ActivityChannel(Integer orderType) {
        if (Objects.equals(CreateOrderType.TAKE_OUT.getCode(), orderType)) {
            return ActivityChannelEnum.delivery;
        } else if (Objects.equals(CreateOrderType.COLLECT_GOODS.getCode(), orderType)) {
            return ActivityChannelEnum.pickup;
        } else if (Objects.equals(CreateOrderType.SAASMALL.getCode(), orderType)) {
            return ActivityChannelEnum.saasmall;
        } else {
            return null;
        }
    }
}
