package com.heyu.api.data.service.impl.order;

import com.heyu.api.data.entity.vv.VvTradeOrderLineEntity;
import com.heyu.api.data.enums.ActionEnums;
import com.heyu.api.data.enums.OrderStatusEnums;
import com.heyu.api.data.service.impl.AbstractOrderAction;

public class ShippedAction extends AbstractOrderAction {
    @Override
    public ActionEnums getAction(VvTradeOrderLineEntity vvTradeOrderLineEntity, boolean isApp) {
        if (
                OrderStatusEnums.shipping.getStatus().equals(vvTradeOrderLineEntity.getStatus())
        ) {
            if (isApp) {
                return ActionEnums.App_Shipped;
            }

            return ActionEnums.Admin_Shipped;
        }
        return null;
    }
}
