From 4fb63e19719454499fe6316a8d13d1729558e281 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Fri, 19 Jan 2024 12:53:58 +0100 Subject: [PATCH] Update inventory diagram to include form details This also fixes the direction of the form inheritance, which was reversed previously. --- .../asciidoc/models/design/inventory.puml | 55 +++++++++++++++++-- src/main/asciidoc/models/design/inventory.svg | 4 +- 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/src/main/asciidoc/models/design/inventory.puml b/src/main/asciidoc/models/design/inventory.puml index 4e6817a..88b35c2 100644 --- a/src/main/asciidoc/models/design/inventory.puml +++ b/src/main/asciidoc/models/design/inventory.puml @@ -61,11 +61,56 @@ package catering { InventoryInitializer .u.> Salespoint.UniqueInventoryItem InventoryInitializer .u.> Spring.Assert - class InventoryMutateForm - class ConsumableMutateForm - class RentableMutateForm - ConsumableMutateForm <|-- InventoryMutateForm - RentableMutateForm <|-- InventoryMutateForm + class InventoryMutateForm { + - name: String + - quantity: Long + - retailPrice: Double + - orderTypes: Set + - metric: Metric + + + getName(): String + + getQuantity(): Long + + getRetailPrice() Double + + getMetric(): Metric + + getOrderTypes(): Set + + setName(name: String) + + setRetailPrice(Double retailPrice) + + setOrderTypes(orderTypes: Set) + + setMetric(metric: Metric) + + + {static}forProductType(Class type): InventoryMutateForm + + {static}of(item: UniqueInventoryItem): InventoryMutateForm + + {abstract}toProduct(): Product + + modifyProduct(product: Product) + # {abstract}modifyProductPrimitive(product: Product) + + {static}orderTypesFromCategories(categories: Streamable): Set + + supportedMetrics(): Collection + } + class ConsumableMutateForm { + - wholesalePrice: Double + - promotionPrice: Optional + + + getWholesalePrice(): Double + + getPromotionPrice(): Optional + + setWholesalePrice(wholesalePrice: Double) + + setPromotionPrice(promotionPrice: Optional) + + + {static}of(item: UniqueInventoryItem): ConsumableMutateForm + + toProduct(): Product + # modifyProductPrimitive(product: Product) + } + class RentableMutateForm { + - wholesalePrice: Double + + + getWholesalePrice(): Double + + setWholesalePrice(wholesalePrice: Double) + + + {static}of(item: UniqueInventoryItem) + + toProduct(): Product + # modifyProductPrimitive(product: Product) + } + ConsumableMutateForm --|> InventoryMutateForm + RentableMutateForm --|> InventoryMutateForm InventoryMutateForm ..> Salespoint.Quantity diff --git a/src/main/asciidoc/models/design/inventory.svg b/src/main/asciidoc/models/design/inventory.svg index 025af30..5089ac4 100644 --- a/src/main/asciidoc/models/design/inventory.svg +++ b/src/main/asciidoc/models/design/inventory.svg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3014cbef977f058555cdcaa33abef34ceb61f7921842b84fa41a0a5f265a40ce -size 49706 +oid sha256:3e75b3122b3b631d0eb98cc103ade1e6ee692c1b94ddaf48da050205a51df907 +size 60413