Update order design to match prototype

Add orderCatalog.puml UML-diagram.
Split up the order and orderCatalog UML-diagrams to reduce the size.
Updated the developer_documentation.adoc.
This commit is contained in:
Erik Hohlfeld 2023-11-16 18:28:09 +01:00 committed by Simon Bruder
parent a1fb091bea
commit 5eaf97d8db
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
5 changed files with 86 additions and 6 deletions

View file

@ -249,6 +249,18 @@ image:models/design/inventory.svg[class design diagram - Inventory]
|InventoryMutateForm |An class to validate the user input of the edit/add form
|===
=== OrderCatalog
image:models/design/orderCatalog.svg[class design diagram - OrderCatalog]
[options="header"]
|===
|Class/Enumeration |Description
|OrderCatalogController |A Spring MVC Controller to handle the event catalog
|OrderCatalogEntry |A class to save an event pack created by the administrator
|OrderCatalogEntryRepository |A repository to save all event packs in the form of OrderCatalogEntry
|===
=== Order
image:models/design/order.svg[class design diagram - Order]

View file

@ -27,7 +27,7 @@ package catering.order {
- finish : LocalDateTime
}
enum OrderType {
enum EventType {
EVENT_CATERING
RENT_A_COOK
BREAKFAST_SERVICE
@ -57,15 +57,16 @@ package catering.order {
OrderController ...> Cash
OrderController ...> Quantity
OrderController ...> CustomOrder
CustomOrder o--- "1" OrderType : -orderType
CustomOrder o--- "1" EventType : -eventType
OrderController ...> ProductForm
N1 ..> OrderType
N1 ..> EventType
}
OrderController ...> Salespoint.Product
CustomOrder ---|> Salespoint.Order
CustomOrder --|> Salespoint.Order
CustomOrder ...> time.LocalDateTime
CustomOrder ...> time.DateTimeFormatter
OrderController .....> catering.orderCatalog.OrderCatalogEntry
package time {
class LocalDateTime

BIN
src/main/asciidoc/models/design/order.svg (Stored with Git LFS)

Binary file not shown.

View file

@ -0,0 +1,64 @@
@startuml
skinparam linetype ortho
skinparam groupInheritance 2
package Spring {
interface Model
}
package Salespoint {
class Cash
class Quantity
class UserAccount
class Product
}
package catering.order {
enum EventType
}
package catering.orderCatalog {
class OrderCatalogController {
+ OrderCatalogController()
+ catalog(model : Model) : String
+ configureCatalog(model : Model) : String
+ catalogAdd(eventType : OrderCatalogEntry.EventType, minimumTimePeriod : int, totalCost : int, model : Model) : String
+ removeEntry(catalogEntryID : int) : String
+ addProduct(name : String, amount : int, cost : double) : String
+ removeProduct(id : String, model : Model) : String
+ addTime(minimumTimePeriod : int, eventType : OrderCatalogEntry.EventType, products : Collection<Salespoint.Product>, model : Model) : String
+ chooseEvent(events : String) : String
}
class OrderCatalogEntry {
+ OrderCatalogEntry()
+ getId() : int
+ getEventType() : EventType
+ getProducts() : Collection<Salespoint.Product>
+ getMinimumTimePeriod() : int
+ getTotalCost() : int
+ setEventType(eventType : EventType) : void
+ setMinimumTimePeriod(timePeriod : int) : void
+ setTotalCost(totalCost : int) : void
+ addProduct(name : String, count : Integer) : void
}
class OrderCatalogEntryRepository {
+ OrderCatalogEntryRepository()
+ addCatalogEntry(catalogEntry : OrderCatalogEntry) : boolean
+ removeCatalogEntry(catalogEntryID : int) : boolean
+ getCatalogEntries() : Set<OrderCatalogEntries>
}
}
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
@enduml

BIN
src/main/asciidoc/models/design/orderCatalog.svg (Stored with Git LFS) Normal file

Binary file not shown.