Update catalog design model

This commit is contained in:
Theo Reichert 2023-11-11 18:07:03 +01:00 committed by Simon Bruder
parent 949fc09bf4
commit b2761bca3c
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 23 additions and 18 deletions

View file

@ -2,6 +2,10 @@
skinparam linetype ortho skinparam linetype ortho
skinparam groupInheritance 2 skinparam groupInheritance 2
package javax.money {
class MonetaryAmount
}
package Spring { package Spring {
interface Model interface Model
class Sort class Sort
@ -18,14 +22,15 @@ package Salespoint {
interface Inventory << T > InventoryItem >> interface Inventory << T > InventoryItem >>
class Product { class Product {
- name : String - name : String
+ Product(name : String, price : javax.money.MonetaryAmount, [Metric : metric]) - price : MonetaryAmount
+ Product(name : String, price : MonetaryAmount, [Metric : metric])
+ getID() : Product.Identifier + getID() : Product.Identifier
+ getCategories() : Streamable<String> + getCategories() : Streamable<String>
'+ addCategory(category : String) : boolean '+ addCategory(category : String) : boolean
'+ removeCategory(category : String) : boolean '+ removeCategory(category : String) : boolean
+ getName() : String + getName() : String
+ getPrice() : @NonNull javax.money.MonetaryAmount + getPrice() : @NonNull MonetaryAmount
'+ setPrice() : @NonNull javax.money.MonetaryAmount + setPrice(MonetaryAmount) : void
'+ supports(quantity : Quantity) : boolean '+ supports(quantity : Quantity) : boolean
} }
@ -60,23 +65,23 @@ package catering.catalog {
} }
class Consumable { class Consumable {
'- wholesalePrice : javax.money.MonetaryAmount - promotionPrice : MonetaryAmount
- retailPrice : javax.money.MonetaryAmount - wholesalePrice : MonetaryAmount
- promotionPrice : javax.money.MonetaryAmount + Consumable(name : String, retailPrice : MonetaryAmount, wholesalePrice : MonetaryAmount) : Consumable
+ Consumable(name : String, price : javax.money.MonetaryAmount) : Consumable + Consumable(name : String, retailPrice : MonetaryAmount, wholesalePrice : MonetaryAmount, promotionPrice : MonetaryAmount) : Consumable
+ getPrice() : javax.money.MonetaryAmount + getPrice() : MonetaryAmount
+ setPrice() : javax.money.MonetaryAmount + getRetailPrice() : MonetaryAmount
'+ setWholeSalePrice(price : javax.money.MonetaryAmount) + setPrice(price : MonetaryAmount) : void
+ setRetailPrice(price : javax.money.MonetaryAmount) + getPromotionPrice(): MonetaryAmount
+ setPromotionPrice(price : javax.money.MonetaryAmount) + setPromotionPrice(price : MonetaryAmount)
+ getWholeSalePrice() : MonetaryAmount
+ setWholeSalePrice(price : MonetaryAmount)
} }
Consumable --|> Product Consumable --|> Product
Consumable ..> MonetaryAmount : use
class Rentable { class Rentable {
- pricePerHour : javax.money.MonetaryAmount + Rentable(name : String, pricePerHour : MonetaryAmount) : Rentable
+ Rentable(name : String, pricePerHour : javax.money.MonetaryAmount) : Rentable
+ getPrice() : javax.money.MonetaryAmount 'return pricePerHour'
+ setPrice(price : javax.money.MonetaryAmount)
} }
Rentable --|> Product Rentable --|> Product

Binary file not shown.