Add staff design model

This commit is contained in:
Denis Natusch 2023-11-08 16:36:48 +01:00 committed by Simon Bruder
parent dc1ff84824
commit b6f774664f
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 73 additions and 0 deletions

View file

@ -0,0 +1,70 @@
@startuml
skinparam linetype ortho
skinparam groupInheritance 2
package java.util {
class ArrayList
class Collection
class HashSet
class Optional
class Set
}
package catering {
package staff {
class Staff {
- id: int
- surname: String
- name: String
- job: String
+ Staff(name: String, surname: String, job: String)
+ getId(): int
+ getSurname(): String
+ getName(): String
+ getJob(): String
+ setId(): void
+ setSurname(): void
+ setName(): void
+ setJob(): void
}
class StaffController {
+ StaffController(staffRepository: StaffRepository)
+ getStaff(model Model): String
+ removeStaff(staffID: int, model Model): String
+ addStaff(name: String, surname: String, job: String): String
+ editStaff(id: int, model Model): String
+ updateStaff(staff: Staff): String
}
class StaffDataInitializer {
+ StaffDataInitializer(staffRepository: StaffRepository)
+ initialize(): void
}
class StaffRepository {
+ StaffRepository()
+ addStaff(staff: Staff): boolean
+ save(staff: Staff): void
+ count(): long
+ removeStaff(staffID: int) boolean
+ getStaff(): Collection<Staff>
+ findById(id: int): Optional<Staff>
}
}
}
StaffRepository *-- Staff : -staff
StaffController --> StaffRepository : -staffRepository
StaffDataInitializer --> StaffRepository : -staffRepository
StaffRepository --> Set : -staffs
StaffRepository --> HashSet : use
StaffRepository --> Collection : use
StaffRepository --> Optional : use
StaffRepository --> ArrayList : use
@enduml

BIN
src/main/asciidoc/models/design/staff.svg (Stored with Git LFS) Normal file

Binary file not shown.