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

View File

@ -4,6 +4,7 @@ public enum HsOfficePersonType {
UNKNOWN_PERSON_TYPE("??"), UNKNOWN_PERSON_TYPE("??"),
NATURAL_PERSON("NP"), // a human being NATURAL_PERSON("NP"), // a human being
LEGAL_PERSON("LP"), // incorporated legal entity like A/S, GmbH, e.K., eG, e.V. 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 INCORPORATED_FIRM("IF"), // registered business partnership like OHG, Partnerschaftsgesellschaft
UNINCORPORATED_FIRM("UF"), // unregistered partnership, association etc. like GbR, ARGE, community of heirs 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 PUBLIC_INSTITUTION("PI"); // entities under public law like government entities, KdöR, AöR

View File

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

View File

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

View File

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