Update class diagram of orderCatalog

This commit is contained in:
Erik Hohlfeld 2024-01-19 13:12:30 +01:00 committed by Mathis
parent 5aefd4e05f
commit 989be26391
5 changed files with 45 additions and 34 deletions

View file

@ -9,71 +9,76 @@ package Spring {
}
package Salespoint {
class Cash
class Quantity
class UserAccount
class Product
class Inventory
class Cart
}
package catering.order {
enum EventType
class OrderController
enum OrderType
}
package javax.money {
class MonetaryAmount
}
package catering.orderCatalog {
class OrderCatalogController {
+ OrderCatalogController()
class CatalogController {
+ CatalogController()
+ catalog(model : Model) : String
+ editCatalog(model : Model) : String
+ addCatalogEntry(eventType : OrderCatalogEntry.EventType, minimumTimePeriod : int, totalCost : int, model : Model) : String
+ removeEntry(catalogEntryID : int) : String
+ addProduct(name : String, amount : int, cost : double) : String
+ addCatalogEntry(eventType : order.OrderType, totalCost : double, model : Model) : String
+ removeEntry(catalogEntryID : long) : String
+ addProduct(product : Salespoint.Product, number : Salespoint.Quantity) : String
+ removeProduct(id : String, model : Model) : String
+ chooseEvent(events : String) : String
+ addToCart(catalogEntryID : long) : String
}
class OrderCatalogEntry {
class CustomCatalogEntry {
- id : Long
- eventType : OrderType
- eventType : order.OrderType
- products : Map<Salespoint.Product, Salespoint.Quantity>
- totalCost: double
+ OrderCatalogEntry()
- totalCost: javax.money.MonetaryAmount
+ CustomCatalogEntry()
+ getId() : long
+ getEventType() : OrderType
+ getEventType() : order.OrderType
+ getProducts() : Map<Salespoint.Product, Salespoint.Quantity>
+ getTotalCost() : double
+ setEventType(eventType : OrderType) : void
+ setTotalCost(totalCost : double) : void
+ getTotalCost() : javax.money.MonetaryAmount
+ setEventType(eventType : order.OrderType) : void
+ setTotalCost(javax.money.MonetaryAmount : double) : void
+ addProduct(product : Salespoint.Product, count : Salespoint.Quantity) : void
+ setProducts(Map<Salespoint.Product, Salespoint.Quantity>) : void
}
interface OrderCatalogEntryRepository {
+ OrderCatalogEntryRepository()
+ addCatalogEntry(catalogEntry : OrderCatalogEntry) : boolean
+ removeCatalogEntry(catalogEntryID : int) : boolean
+ getCatalogEntries() : Set<OrderCatalogEntries>
interface CustomCatalogEntryRepository {
+ findAll() : Streamable<CustomCatalogEntry
+ findByProduct(product : Salespoint.Product) : Streamable<CustomCatalogEntry>
}
class CartService {
- CustomCart cart
- cart : CustomCart
+ CartService()
+ getCart() : CustomCart
+ setCart(CustomCart cart) : void
+ setCart(cart : CustomCart) : void
}
}
OrderCatalogEntryRepository o---> OrderCatalogEntry
OrderCatalogController ...> OrderCatalogEntryRepository
OrderCatalogEntryRepository --|> Spring.CrudRepository
OrderCatalogController ...> Salespoint.Product
OrderCatalogController ..> Spring.Model
OrderCatalogController ...> Salespoint.Cash
OrderCatalogController ...> Salespoint.Quantity
OrderCatalogController ...> Salespoint.UserAccount
OrderCatalogEntry ...> catering.order.EventType
CustomCatalogEntryRepository o---> CustomCatalogEntry
CatalogController ...> CustomCatalogEntryRepository
CustomCatalogEntryRepository --|> Spring.CrudRepository
CatalogController ...> Salespoint.Product
CatalogController ..> Spring.Model
CatalogController ...> Salespoint.Quantity
CatalogController ...> Salespoint.UserAccount
CustomCatalogEntry ...> catering.order.OrderType
CartService ...> catering.order.OrderController
OrderCatalogController ...> Salespoint.Inventory
CatalogController ...> Salespoint.Inventory
CustomCatalogEntry ...> javax.money.MonetaryAmount
CatalogController ...> catering.order.OrderType
catering.order.OrderController ...> Salespoint.Cart
@enduml

Binary file not shown.

View file

@ -1,3 +1,5 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
// SPDX-FileCopyrightText: 2023-2024 swt23w23
package catering.orderCatalog;
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.user;

View file

@ -1,3 +1,5 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
// SPDX-FileCopyrightText: 2023-2024 swt23w23
package catering.orderCatalog;
import static org.assertj.core.api.Assertions.assertThat;

View file

@ -1,3 +1,5 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
// SPDX-FileCopyrightText: 2023-2024 swt23w23
package catering.orderCatalog;
import static org.junit.jupiter.api.Assertions.assertTrue;