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 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
@enduml

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

Binary file not shown.