From 3b77717506facbe0d053b0ab42e65878b1f3f36a Mon Sep 17 00:00:00 2001 From: Denis Natusch Date: Thu, 9 Nov 2023 18:47:11 +0100 Subject: [PATCH] Add customer design module --- src/main/asciidoc/models/design/customer.puml | 64 +++++++++++++++++++ src/main/asciidoc/models/design/customer.svg | 3 + 2 files changed, 67 insertions(+) create mode 100644 src/main/asciidoc/models/design/customer.puml create mode 100644 src/main/asciidoc/models/design/customer.svg diff --git a/src/main/asciidoc/models/design/customer.puml b/src/main/asciidoc/models/design/customer.puml new file mode 100644 index 0000000..98b7810 --- /dev/null +++ b/src/main/asciidoc/models/design/customer.puml @@ -0,0 +1,64 @@ +@startuml + +skinparam linetype ortho +skinparam groupInheritance 2 + +package java.util { + class ArrayList + class Collection + class HashSet + class Optional + class Set +} + +package catering { +package customer { + + class Customer { + - id: int + + Customer() + + addCustomer(customer: Customer): boolean + + save(customer: Customer): void + + count(): long + + removeCustomer(customerID: int): boolean + + getCustomers(): Collection + + findById(id: int): Optional + } + + class CustomerController { + + CustomerController(staffRepository: StaffRepository) + + getCustomer(model Model): String + + removeCustomer(customerID: int, model Model): String + + editCustomer(id: int, model Model): String + + updateCustomer(customer: Customer): String + } + + class CustomerDataInitializer { + + CustomerDataInitializer(customeRepository: CustomeRepository) + + initialize(): void + } + + class CustomerRepository { + + CustomerRepository() + + addCustomer(customer: Customer): boolean + + save(customer: Customer): void + + count(): long + + removeStaff(staffID: int) boolean + + getCustomer(): Collection + + findById(id: int): Optional + } + +} +} + +CustomerRepository *-- Customer : -customer +CustomerController --> CustomerRepository : -customerRepository +CustomerDataInitializer --> CustomerRepository : -customerRepository +CustomerRepository --> Set : -customers +CustomerRepository --> HashSet : use +CustomerRepository --> Collection : use +CustomerRepository --> Optional : use +CustomerRepository --> ArrayList : use + + +@enduml diff --git a/src/main/asciidoc/models/design/customer.svg b/src/main/asciidoc/models/design/customer.svg new file mode 100644 index 0000000..862d738 --- /dev/null +++ b/src/main/asciidoc/models/design/customer.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f48b4b46b12caee08e2b74388918210df2c27842a2e0e0420df4d6f338de6ce8 +size 25546