Update user design model to match prototype

This commit is contained in:
Denis Natusch 2023-11-08 16:02:41 +01:00 committed by Simon Bruder
parent 4378325b39
commit dc1ff84824
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 30 additions and 31 deletions

View file

@ -7,48 +7,47 @@ package Salespoint {
interface UserAccountManagement interface UserAccountManagement
interface DataInitalizer interface DataInitalizer
class UserAccount class UserAccount
UserAccount - Role : "0...*" class CrudRepository
class Role
} }
package catering.users { package catering.users {
class Customer { class User {
- address - address : String
- email + User(userAccount : UserAccount, address : String)
+ Customer(userAccount : UserAccount, address : String, email : String) + User()
+ getAddress() : String + getAddress() : String
+ setAddress() : String + setAddress() : String
+ getUsername() : String
+ setUsername() : boolean
+ getUserAccount() : UserAccount + getUserAccount() : UserAccount
+ getId() : UserIdentifier
} }
Customer --> UserAccount : "-userAccount" User --> UserAccount : "-userAccount"
class UserController { class UserController {
+ UserController() + UserController(userManagement: UserManagement)
+ register(form : Form, model : Model) : String + index(): String
+ customers(model : Model) : String + editProfile(name: String, password: String, address: String): String
+ deleteUser(): String
} }
UserController --> CustomerManagement : "-customerManagement" UserController --> UserManagement : "-userManagement"
class CustomerManagement { class UserManagement {
+ CustomerManagement(customers : CustomerRepository, userAccounts : UserAccountsManagement) + UserManagement(users : UserRepository, userAccounts : UserAccountManagement)
+ createCustomer(form : RegistrationForm) : Customer + createUser(name: String, password: String, address: String) : user
+ findAll() : Streamable + findAll() : Streamable
} }
CustomerManagement ---> UserAccountManagement : "-userAccounts" UserManagement ---> UserAccountManagement : "-userAccounts"
CustomerManagement ...> Role : "uses" UserManagement ---> UserRepository : "-users"
class CustomerDataInitalizer { class UserDataInitalizer {
+ CustomerDataInitalizer(userAcccountManager : UserAccountManagement, customerRepository : CustomerRepository) - userManagement : UserManagement
+ UserDataInitalizer(userManagement : UserManagement)
+ initalize() : void + initalize() : void
} }
CustomerDataInitalizer --> CustomerManagement : "-customerManagement" UserDataInitalizer --> UserManagement : "-userManagement"
CustomerDataInitalizer --> UserAccountManagement : "-userAcccountManagement" UserDataInitalizer ..|> DataInitalizer
CustomerDataInitalizer ..|> DataInitalizer class UserRepository {
}
UserRepository --|> CrudRepository
} }
@enduml
'do employees need an account?'
@enduml

BIN
src/main/asciidoc/models/design/user.svg (Stored with Git LFS)

Binary file not shown.