add person-type ORGANIZATIONAL_UNIT

This commit is contained in:
Michael Hoennig 2025-01-22 12:41:47 +01:00
parent 2b2638d0f9
commit da41f2d1c8
5 changed files with 8 additions and 6 deletions

View File

@ -50,6 +50,7 @@ classDiagram
UNKNOWN: nur für Import
NATURAL_PERSON: natürliche Person
LEGAL_PERSON: z.B. GmbH, e.K., eG, e.V.
ORGANIZATIONAL_UNIT: z.B. "Admin-Team", "Buchhaltung"
INCORORATED_FIRM: z.B. OHG, Partnerschaftsgesellschaft
UNINCORPORATED_FIRM: z.B. GbR, ARGE, Erbengemeinschaft
PUBLIC_INSTITUTION: KdöR, AöR [ohne Registergericht/Registernummer]

View File

@ -4,6 +4,7 @@ public enum HsOfficePersonType {
UNKNOWN_PERSON_TYPE("??"),
NATURAL_PERSON("NP"), // a human being
LEGAL_PERSON("LP"), // incorporated legal entity like A/S, GmbH, e.K., eG, e.V.
ORGANIZATIONAL_UNIT("OU"), // groups of persons within an organization, e.g. "Admin-Team", "Buchhaltung"
INCORPORATED_FIRM("IF"), // registered business partnership like OHG, Partnerschaftsgesellschaft
UNINCORPORATED_FIRM("UF"), // unregistered partnership, association etc. like GbR, ARGE, community of heirs
PUBLIC_INSTITUTION("PI"); // entities under public law like government entities, KdöR, AöR

View File

@ -9,6 +9,7 @@ components:
- UNKNOWN_PERSON
- NATURAL_PERSON
- LEGAL_PERSON
- ORGANIZATIONAL_UNIT
- INCORPORATED_FIRM
- UNINCORPORATED_FIRM
- PUBLIC_INSTITUTION

View File

@ -8,6 +8,7 @@ CREATE TYPE hs_office.PersonType AS ENUM (
'??', -- unknown
'NP', -- natural person
'LP', -- legal person
'OU', -- organizational unit
'IF', -- incorporated firm
'UF', -- unincorporated firm
'PI'); -- public institution

View File

@ -85,9 +85,8 @@ class HsOfficePersonControllerAcceptanceTest extends ContextBasedTestWithCleanup
.contentType(ContentType.JSON)
.body("""
{
"personType": "NATURAL_PERSON",
"familyName": "Tester",
"givenName": "Temp Testi"
"personType": "ORGANIZATIONAL_UNIT",
"tradeName": "Admin-Team"
}
""")
.port(port)
@ -97,9 +96,8 @@ class HsOfficePersonControllerAcceptanceTest extends ContextBasedTestWithCleanup
.statusCode(201)
.contentType(ContentType.JSON)
.body("uuid", isUuidValid())
.body("personType", is("NATURAL_PERSON"))
.body("familyName", is("Tester"))
.body("givenName", is("Temp Testi"))
.body("personType", is("ORGANIZATIONAL_UNIT"))
.body("tradeName", is("Admin-Team"))
.header("Location", startsWith("http://localhost"))
.extract().header("Location"); // @formatter:on