Update inventory design model to match prototype

This commit is contained in:
Simon Bruder 2023-11-05 16:36:32 +01:00
parent 3feb0dfef2
commit 003e9f39c8
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 37 additions and 29 deletions

View file

@ -1,46 +1,54 @@
@startuml @startuml
'maybe for sbruder since he did videoshop:inventory-increment'
'maybe TR0N-ZEN since he did videoshop:keyword-search'
skinparam linetype ortho skinparam linetype ortho
skinparam groupInheritance 2 skinparam groupInheritance 2
package Spring { package Spring {
interface Model class Assert
'havent used Assert yet as in example' class Errors
interface Model
} }
package Salespoint { package Salespoint {
interface DataInitializer interface DataInitializer
class Quantity class Product
interface UniqueInventory<T extends UniqueInventoryItem> class Quantity
class UniqueInventoryItem interface UniqueInventory<T extends UniqueInventoryItem>
class UniqueInventoryItem
} }
package catering.catalog { package catering {
package catalog {
interface CateringCatalog interface CateringCatalog
} }
package catering.inventory { package inventory {
class InventoryController { class InventoryController {
+ InventoryController(inventory : UniqueInventory) + InventoryController(inventory : UniqueInventory)
+ stock(model : Model) : String + list(model : Model) : String
+ edit(model : Model, pid : Product) : String
+ edit(form : InventoryMutateForm, result : Errors, pid : Product) : String
+ add() : String
+ add(form : InventoryMutateForm, result : Errors) : String
+ delete(pid : Product) : String
} }
InventoryController ..> Model InventoryController ..> InventoryMutateForm
InventoryController --> UniqueInventory : "-inventory" InventoryController .u.> Salespoint.Product
InventoryController -u-> "1" Salespoint.UniqueInventory : "-inventory"
InventoryController .u.> Salespoint.UniqueInventoryItem
InventoryController .u.> Spring.Assert
InventoryController .u.> Spring.Errors
InventoryController .u.> Spring.Model
class InventoryInitializer { class InventoryInitializer {
+ InventoryInitializer(inventory : UniqueInventory, catalog : CateringCatalog) + InventoryInitializer(inventory : UniqueInventory, catalog : CateringCatalog)
+ initialize() : void + initialize() : void
} }
InventoryInitializer --> CateringCatalog : "-cateringCatalog" InventoryInitializer --> "1" catering.catalog.CateringCatalog : "-cateringCatalog"
InventoryInitializer ..|> DataInitializer InventoryInitializer .u.|> Salespoint.DataInitializer
InventoryInitializer ..> Quantity InventoryInitializer .u.> Salespoint.Quantity
InventoryInitializer ..> UniqueInventoryItem InventoryInitializer -u-> "1" Salespoint.UniqueInventory : "-inventory"
InventoryInitializer ---> UniqueInventory : "-inventory" InventoryInitializer .u.> Salespoint.UniqueInventoryItem
InventoryInitializer .u.> Spring.Assert
}
} }
@enduml @enduml

Binary file not shown.