diff --git a/src/main/java/net/hostsharing/hsadminng/hs/office/relationship/HsOfficeRelationshipType.java b/src/main/java/net/hostsharing/hsadminng/hs/office/relationship/HsOfficeRelationshipType.java index 980cc04f..0535ca67 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/office/relationship/HsOfficeRelationshipType.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/office/relationship/HsOfficeRelationshipType.java @@ -3,6 +3,6 @@ package net.hostsharing.hsadminng.hs.office.relationship; public enum HsOfficeRelationshipType { UNKNOWN, REPRESENTATIVE, - ACCOUNTING_CONTACT, - TECHNICAL_CONTACT + ACCOUNTING, + OPERATIONS } diff --git a/src/main/resources/api-definition/hs-office/hs-office-relationship-schemas.yaml b/src/main/resources/api-definition/hs-office/hs-office-relationship-schemas.yaml index ed4111bd..cfda18c0 100644 --- a/src/main/resources/api-definition/hs-office/hs-office-relationship-schemas.yaml +++ b/src/main/resources/api-definition/hs-office/hs-office-relationship-schemas.yaml @@ -7,8 +7,8 @@ components: type: string enum: - REPRESENTATIVE - - ACCOUNTING_CONTACT - - TECHNICAL_CONTACT + - ACCOUNTING + - TECHNICAL HsOfficeRelationship: type: object diff --git a/src/main/resources/db/changelog/230-hs-office-relationship.sql b/src/main/resources/db/changelog/230-hs-office-relationship.sql index 2efca56a..826b7bba 100644 --- a/src/main/resources/db/changelog/230-hs-office-relationship.sql +++ b/src/main/resources/db/changelog/230-hs-office-relationship.sql @@ -4,7 +4,7 @@ --changeset hs-office-relationship-MAIN-TABLE:1 endDelimiter:--// -- ---------------------------------------------------------------------------- -CREATE TYPE HsOfficeRelationshipType AS ENUM ('UNKNOWN', 'REPRESENTATIVE', 'ACCOUNTING_CONTACT', 'TECHNICAL_CONTACT'); +CREATE TYPE HsOfficeRelationshipType AS ENUM ('UNKNOWN', 'REPRESENTATIVE', 'ACCOUNTING', 'OPERATIONS'); CREATE CAST (character varying as HsOfficeRelationshipType) WITH INOUT AS IMPLICIT; diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/relationship/HsOfficeRelationshipControllerAcceptanceTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/relationship/HsOfficeRelationshipControllerAcceptanceTest.java index 60f393c1..bbfa43ff 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/relationship/HsOfficeRelationshipControllerAcceptanceTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/relationship/HsOfficeRelationshipControllerAcceptanceTest.java @@ -153,7 +153,7 @@ class HsOfficeRelationshipControllerAcceptanceTest { "contactUuid": "%s" } """.formatted( - HsOfficeRelationshipTypeResource.ACCOUNTING_CONTACT, + HsOfficeRelationshipTypeResource.ACCOUNTING, givenAnchorPerson.getUuid(), givenHolderPerson.getUuid(), givenContact.getUuid())) @@ -164,7 +164,7 @@ class HsOfficeRelationshipControllerAcceptanceTest { .statusCode(201) .contentType(ContentType.JSON) .body("uuid", isUuidValid()) - .body("relType", is("ACCOUNTING_CONTACT")) + .body("relType", is("ACCOUNTING")) .body("relAnchor.tradeName", is("Third OHG")) .body("relHolder.givenName", is("Paul")) .body("contact.label", is("forth contact")) @@ -197,7 +197,7 @@ class HsOfficeRelationshipControllerAcceptanceTest { "contactUuid": "%s" } """.formatted( - HsOfficeRelationshipTypeResource.ACCOUNTING_CONTACT, + HsOfficeRelationshipTypeResource.ACCOUNTING, givenAnchorPersonUuid, givenHolderPerson.getUuid(), givenContact.getUuid())) @@ -230,7 +230,7 @@ class HsOfficeRelationshipControllerAcceptanceTest { "contactUuid": "%s" } """.formatted( - HsOfficeRelationshipTypeResource.ACCOUNTING_CONTACT, + HsOfficeRelationshipTypeResource.ACCOUNTING, givenAnchorPerson.getUuid(), givenHolderPersonUuid, givenContact.getUuid())) @@ -263,7 +263,7 @@ class HsOfficeRelationshipControllerAcceptanceTest { "contactUuid": "%s" } """.formatted( - HsOfficeRelationshipTypeResource.ACCOUNTING_CONTACT, + HsOfficeRelationshipTypeResource.ACCOUNTING, givenAnchorPerson.getUuid(), givenHolderPerson.getUuid(), givenContactUuid))