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

Binary file not shown.