From dc1ff84824db5a21b60735d39864492c6db20fc2 Mon Sep 17 00:00:00 2001 From: Denis Natusch Date: Wed, 8 Nov 2023 16:02:41 +0100 Subject: [PATCH] Update user design model to match prototype --- src/main/asciidoc/models/design/user.puml | 57 +++++++++++------------ src/main/asciidoc/models/design/user.svg | 4 +- 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/src/main/asciidoc/models/design/user.puml b/src/main/asciidoc/models/design/user.puml index e216e88..69c7238 100644 --- a/src/main/asciidoc/models/design/user.puml +++ b/src/main/asciidoc/models/design/user.puml @@ -7,48 +7,47 @@ package Salespoint { interface UserAccountManagement interface DataInitalizer class UserAccount - UserAccount - Role : "0...*" - class Role + class CrudRepository } package catering.users { - class Customer { - - address - - email - + Customer(userAccount : UserAccount, address : String, email : String) + class User { + - address : String + + User(userAccount : UserAccount, address : String) + + User() + getAddress() : String + setAddress() : String + + getUsername() : String + + setUsername() : boolean + getUserAccount() : UserAccount + + getId() : UserIdentifier } - Customer --> UserAccount : "-userAccount" + User --> UserAccount : "-userAccount" class UserController { - + UserController() - + register(form : Form, model : Model) : String - + customers(model : Model) : String + + UserController(userManagement: UserManagement) + + index(): String + + editProfile(name: String, password: String, address: String): String + + deleteUser(): String } - UserController --> CustomerManagement : "-customerManagement" + UserController --> UserManagement : "-userManagement" - class CustomerManagement { - + CustomerManagement(customers : CustomerRepository, userAccounts : UserAccountsManagement) - + createCustomer(form : RegistrationForm) : Customer + class UserManagement { + + UserManagement(users : UserRepository, userAccounts : UserAccountManagement) + + createUser(name: String, password: String, address: String) : user + findAll() : Streamable } - CustomerManagement ---> UserAccountManagement : "-userAccounts" - CustomerManagement ...> Role : "uses" - class CustomerDataInitalizer { - + CustomerDataInitalizer(userAcccountManager : UserAccountManagement, customerRepository : CustomerRepository) + UserManagement ---> UserAccountManagement : "-userAccounts" + UserManagement ---> UserRepository : "-users" + class UserDataInitalizer { + - userManagement : UserManagement + + UserDataInitalizer(userManagement : UserManagement) + initalize() : void } - CustomerDataInitalizer --> CustomerManagement : "-customerManagement" - CustomerDataInitalizer --> UserAccountManagement : "-userAcccountManagement" - CustomerDataInitalizer ..|> DataInitalizer + UserDataInitalizer --> UserManagement : "-userManagement" + UserDataInitalizer ..|> DataInitalizer + class UserRepository { + } + UserRepository --|> CrudRepository } - - - - - -'do employees need an account?' - -@enduml \ No newline at end of file +@enduml diff --git a/src/main/asciidoc/models/design/user.svg b/src/main/asciidoc/models/design/user.svg index 89d8cf3..c534393 100644 --- a/src/main/asciidoc/models/design/user.svg +++ b/src/main/asciidoc/models/design/user.svg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a40991837f8d8da8864aa1709bccee948e3ec542c72a43584a6d92e4ed8fa31 -size 22780 +oid sha256:ec05058f3001a482c79b4be4a268b731e65434991a13c99d15631c8eed5b1e56 +size 22702