Update inventory diagram to include form details

This also fixes the direction of the form inheritance, which was
reversed previously.
This commit is contained in:
Simon Bruder 2024-01-19 12:53:58 +01:00
parent 016d2f5715
commit 4fb63e1971
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 52 additions and 7 deletions

View file

@ -61,11 +61,56 @@ package catering {
InventoryInitializer .u.> Salespoint.UniqueInventoryItem InventoryInitializer .u.> Salespoint.UniqueInventoryItem
InventoryInitializer .u.> Spring.Assert InventoryInitializer .u.> Spring.Assert
class InventoryMutateForm class InventoryMutateForm {
class ConsumableMutateForm - name: String
class RentableMutateForm - quantity: Long
ConsumableMutateForm <|-- InventoryMutateForm - retailPrice: Double
RentableMutateForm <|-- InventoryMutateForm - orderTypes: Set<OrderType>
- metric: Metric
+ getName(): String
+ getQuantity(): Long
+ getRetailPrice() Double
+ getMetric(): Metric
+ getOrderTypes(): Set<OrderType>
+ setName(name: String)
+ setRetailPrice(Double retailPrice)
+ setOrderTypes(orderTypes: Set<OrderType>)
+ setMetric(metric: Metric)
+ {static}forProductType<T extends Product>(Class<T> type): InventoryMutateForm
+ {static}of(item: UniqueInventoryItem): InventoryMutateForm
+ {abstract}toProduct(): Product
+ modifyProduct(product: Product)
# {abstract}modifyProductPrimitive(product: Product)
+ {static}orderTypesFromCategories(categories: Streamable<String>): Set<OrderType>
+ supportedMetrics(): Collection<Metric>
}
class ConsumableMutateForm {
- wholesalePrice: Double
- promotionPrice: Optional<Double>
+ getWholesalePrice(): Double
+ getPromotionPrice(): Optional<Double>
+ setWholesalePrice(wholesalePrice: Double)
+ setPromotionPrice(promotionPrice: Optional<Double>)
+ {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 InventoryMutateForm ..> Salespoint.Quantity

Binary file not shown.