From 1512e0e1a54738065e4c35d183c8afa137b23276 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Tue, 16 Jan 2024 18:44:01 +0100 Subject: [PATCH] first version of functional data model of office module --- doc/hs-office-data-structure.md | 149 +++++++++++++++++++++++++++++++- 1 file changed, 146 insertions(+), 3 deletions(-) diff --git a/doc/hs-office-data-structure.md b/doc/hs-office-data-structure.md index 3f9b5462..bc7b04e5 100644 --- a/doc/hs-office-data-structure.md +++ b/doc/hs-office-data-structure.md @@ -1,8 +1,151 @@ ```mermaid +classDiagram + direction RL -flowchart TB + namespace Geschäftspartner { + class partner-MeierGmbH + class partnerDetails-MeierGmbH + class contact-MeierGmbH + class person-MeierGmbH + + class debitor-MeierGmbH + class contact-MeierGmbH-Buha + + class person-FrankMeier + class contact-FrankMeier + class rel-MeierGmbH-FrankMeier -direction TB + class person-SabineMeier + class contact-SabineMeier + class rel-MeierGmbH-SabineMeier + } + + class partner-MeierGmbH { + +person + +contact + +details + } + partner-MeierGmbH o-- person-MeierGmbH + partner-MeierGmbH o-- contact-MeierGmbH + partner-MeierGmbH *-- partnerDetails-MeierGmbH -Relationship-->Person + class partnerDetails-MeierGmbH { + +registrationOffice + +registrationNumber + +birthName + +dateOfDeath + } + + class person-MeierGmbH { + + personType: LEGAL + + tradeName: Meier GmbH + + familyName + + givenName + } + + class contact-MeierGmbH { + +postalAddress: Hauptstraße 5, 22345 Hamburg + +phoneNumbers: +49 40 12345-00 + +emailAddresses: office@meier-gmbh.de + } + + class debitor-MeierGmbH { + +Partner partner + +Numeric(2) debitorNumberSuffix: 00 + +Contact billingContact + +boolean billable: true + +String vatId: ID123456789 + +String vatCountryCode: DE + +boolean vatBusiness: true + +boolean vatReverseCharge: false + +BankAccount refundBankAccount + +String defaultPrefix: mei + } + debitor-MeierGmbH o-- partner-MeierGmbH + debitor-MeierGmbH o-- contact-MeierGmbH-Buha + + class contact-MeierGmbH-Buha { + +postalAddress: Hauptstraße 5, 22345 Hamburg + +phoneNumbers: +49 40 12345-05 + +emailAddresses: buha@meier-gmbh.de + } + + class person-FrankMeier { + + personType: NATURAL + + tradeName + + familyName: Meier + + givenName: Frank + } + + class contact-FrankMeier { + +postalAddress + +phoneNumbers: +49 40 12345-22 + +emailAddresses: sabine.meier@meier-gmbh.de + } + + class rel-MeierGmbH-FrankMeier { + +RelType relType REPRESENTATIVE + +Person relAnchor + +Person relHolder + +Contact contact + } + rel-MeierGmbH-FrankMeier o-- person-MeierGmbH : relAnchor + rel-MeierGmbH-FrankMeier o-- person-FrankMeier : relHolder + rel-MeierGmbH-FrankMeier o-- contact-FrankMeier + + class person-SabineMeier { + +personType: NATURAL + +tradeName + +familyName: Meier + +givenName: Sabine + } + + class contact-SabineMeier { + +postalAddress + +phoneNumbers: +49 40 12345-22 + +emailAddresses: sabine.meier@meier-gmbh.de + } + + class rel-MeierGmbH-SabineMeier { + +RelType relType OPERATIONAL + +Person relAnchor + +Person relHolder + +Contact contact + } + rel-MeierGmbH-SabineMeier o-- person-MeierGmbH : relAnchor + rel-MeierGmbH-SabineMeier o-- person-SabineMeier : relHolder + rel-MeierGmbH-SabineMeier o-- contact-SabineMeier + + namespace Enums { + + class RelType { + <> + UNKNOWN + REPRESENTATIVE + ACCOUNTING + OPERATIONS + } + + class PersonType { + <> + UNKNOWN + NATURAL + LEGAL + SOLE_REPRESENTATION + JOINT_REPRESENTATION + } + + } +``` + +```mermaid +classDiagram + classA --|> classB : Inheritance + classC --* classD : Composition + classE --o classF : Aggregation + classG --> classH : Association + classI -- classJ : Link(Solid) + classK ..> classL : Dependency + classM ..|> classN : Realization + classO .. classP : Link(Dashed) ```