mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Update class diagram of orderCatalog
This commit is contained in:
parent
5aefd4e05f
commit
989be26391
|
@ -9,71 +9,76 @@ package Spring {
|
||||||
}
|
}
|
||||||
|
|
||||||
package Salespoint {
|
package Salespoint {
|
||||||
class Cash
|
|
||||||
class Quantity
|
class Quantity
|
||||||
class UserAccount
|
class UserAccount
|
||||||
class Product
|
class Product
|
||||||
class Inventory
|
class Inventory
|
||||||
|
class Cart
|
||||||
}
|
}
|
||||||
|
|
||||||
package catering.order {
|
package catering.order {
|
||||||
enum EventType
|
class OrderController
|
||||||
|
enum OrderType
|
||||||
|
}
|
||||||
|
|
||||||
|
package javax.money {
|
||||||
|
class MonetaryAmount
|
||||||
}
|
}
|
||||||
|
|
||||||
package catering.orderCatalog {
|
package catering.orderCatalog {
|
||||||
class OrderCatalogController {
|
class CatalogController {
|
||||||
+ OrderCatalogController()
|
+ CatalogController()
|
||||||
+ catalog(model : Model) : String
|
+ catalog(model : Model) : String
|
||||||
+ editCatalog(model : Model) : String
|
+ editCatalog(model : Model) : String
|
||||||
+ addCatalogEntry(eventType : OrderCatalogEntry.EventType, minimumTimePeriod : int, totalCost : int, model : Model) : String
|
+ addCatalogEntry(eventType : order.OrderType, totalCost : double, model : Model) : String
|
||||||
+ removeEntry(catalogEntryID : int) : String
|
+ removeEntry(catalogEntryID : long) : String
|
||||||
+ addProduct(name : String, amount : int, cost : double) : String
|
+ addProduct(product : Salespoint.Product, number : Salespoint.Quantity) : String
|
||||||
+ removeProduct(id : String, model : Model) : String
|
+ removeProduct(id : String, model : Model) : String
|
||||||
+ chooseEvent(events : String) : String
|
+ chooseEvent(events : String) : String
|
||||||
+ addToCart(catalogEntryID : long) : String
|
+ addToCart(catalogEntryID : long) : String
|
||||||
}
|
}
|
||||||
|
|
||||||
class OrderCatalogEntry {
|
class CustomCatalogEntry {
|
||||||
- id : Long
|
- id : Long
|
||||||
- eventType : OrderType
|
- eventType : order.OrderType
|
||||||
- products : Map<Salespoint.Product, Salespoint.Quantity>
|
- products : Map<Salespoint.Product, Salespoint.Quantity>
|
||||||
- totalCost: double
|
- totalCost: javax.money.MonetaryAmount
|
||||||
+ OrderCatalogEntry()
|
+ CustomCatalogEntry()
|
||||||
+ getId() : long
|
+ getId() : long
|
||||||
+ getEventType() : OrderType
|
+ getEventType() : order.OrderType
|
||||||
+ getProducts() : Map<Salespoint.Product, Salespoint.Quantity>
|
+ getProducts() : Map<Salespoint.Product, Salespoint.Quantity>
|
||||||
+ getTotalCost() : double
|
+ getTotalCost() : javax.money.MonetaryAmount
|
||||||
+ setEventType(eventType : OrderType) : void
|
+ setEventType(eventType : order.OrderType) : void
|
||||||
+ setTotalCost(totalCost : double) : void
|
+ setTotalCost(javax.money.MonetaryAmount : double) : void
|
||||||
+ addProduct(product : Salespoint.Product, count : Salespoint.Quantity) : void
|
+ addProduct(product : Salespoint.Product, count : Salespoint.Quantity) : void
|
||||||
+ setProducts(Map<Salespoint.Product, Salespoint.Quantity>) : void
|
+ setProducts(Map<Salespoint.Product, Salespoint.Quantity>) : void
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OrderCatalogEntryRepository {
|
interface CustomCatalogEntryRepository {
|
||||||
+ OrderCatalogEntryRepository()
|
+ findAll() : Streamable<CustomCatalogEntry
|
||||||
+ addCatalogEntry(catalogEntry : OrderCatalogEntry) : boolean
|
+ findByProduct(product : Salespoint.Product) : Streamable<CustomCatalogEntry>
|
||||||
+ removeCatalogEntry(catalogEntryID : int) : boolean
|
|
||||||
+ getCatalogEntries() : Set<OrderCatalogEntries>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class CartService {
|
class CartService {
|
||||||
- CustomCart cart
|
- cart : CustomCart
|
||||||
+ CartService()
|
+ CartService()
|
||||||
+ getCart() : CustomCart
|
+ getCart() : CustomCart
|
||||||
+ setCart(CustomCart cart) : void
|
+ setCart(cart : CustomCart) : void
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OrderCatalogEntryRepository o---> OrderCatalogEntry
|
CustomCatalogEntryRepository o---> CustomCatalogEntry
|
||||||
OrderCatalogController ...> OrderCatalogEntryRepository
|
CatalogController ...> CustomCatalogEntryRepository
|
||||||
OrderCatalogEntryRepository --|> Spring.CrudRepository
|
CustomCatalogEntryRepository --|> Spring.CrudRepository
|
||||||
OrderCatalogController ...> Salespoint.Product
|
CatalogController ...> Salespoint.Product
|
||||||
OrderCatalogController ..> Spring.Model
|
CatalogController ..> Spring.Model
|
||||||
OrderCatalogController ...> Salespoint.Cash
|
CatalogController ...> Salespoint.Quantity
|
||||||
OrderCatalogController ...> Salespoint.Quantity
|
CatalogController ...> Salespoint.UserAccount
|
||||||
OrderCatalogController ...> Salespoint.UserAccount
|
CustomCatalogEntry ...> catering.order.OrderType
|
||||||
OrderCatalogEntry ...> catering.order.EventType
|
|
||||||
CartService ...> catering.order.OrderController
|
CartService ...> catering.order.OrderController
|
||||||
OrderCatalogController ...> Salespoint.Inventory
|
CatalogController ...> Salespoint.Inventory
|
||||||
|
CustomCatalogEntry ...> javax.money.MonetaryAmount
|
||||||
|
CatalogController ...> catering.order.OrderType
|
||||||
|
catering.order.OrderController ...> Salespoint.Cart
|
||||||
|
|
||||||
@enduml
|
@enduml
|
||||||
|
|
BIN
src/main/asciidoc/models/design/orderCatalog.svg
(Stored with Git LFS)
BIN
src/main/asciidoc/models/design/orderCatalog.svg
(Stored with Git LFS)
Binary file not shown.
|
@ -1,3 +1,5 @@
|
||||||
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
// SPDX-FileCopyrightText: 2023-2024 swt23w23
|
||||||
package catering.orderCatalog;
|
package catering.orderCatalog;
|
||||||
|
|
||||||
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.user;
|
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.user;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
// SPDX-FileCopyrightText: 2023-2024 swt23w23
|
||||||
package catering.orderCatalog;
|
package catering.orderCatalog;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
// SPDX-FileCopyrightText: 2023-2024 swt23w23
|
||||||
package catering.orderCatalog;
|
package catering.orderCatalog;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
Loading…
Reference in a new issue