package com.gingersoft.gsa.cloud.order.order;

import com.gingersoft.gsa.cloud.common.constans.FoodSummaryConstans;

/**
 * @author : bin
 * @create date: 2020-10-23
 * @update date: 2020-10-23
 * @description:訂單工廠類
 */
public class OrderFactory {

    public static BaseOrder createOrder(int orderType) {
        if (orderType == FoodSummaryConstans.RESTAURANT_MODE) {
            return DoshokuOrder.getInstance();
        } else if (orderType == FoodSummaryConstans.TAKEAWAY_TYPE) {
            return TakeawayOrder.getInstance();
        } else {
            return DoshokuOrder.getInstance();
        }
    }



}
