// SPDX-License-Identifier: AGPL-3.0-or-later // SPDX-FileCopyrightText: 2023-2024 swt23w23 package catering.orderCatalog; import catering.order.CustomCart; import catering.order.OrderType; import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.ScopedProxyMode; import org.springframework.stereotype.Service; import java.time.LocalDateTime; @Service @Scope(value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS) public class CartService { private CustomCart cart; public CartService() { this.cart = new CustomCart(OrderType.EVENT_CATERING, LocalDateTime.now().plusDays(7), LocalDateTime.now().plusDays(7).plusHours(1)); } public CustomCart getCart() { return cart; } public void setCart(CustomCart cart) { this.cart = cart; } }