Commit d6f7d99c authored by Ina Curdt's avatar Ina Curdt
Browse files

Merge branch 'DEVELOP' of...

Merge branch 'DEVELOP' of ssh://git.eclipse.org:29418/openk-usermodules/org.eclipse.openk-usermodules.gridFailureInformation.backend into SI-68-Störungsmeldung-historisieren
parents 8e57b85b 8d76b299
echo ------- Login Keycloak -------
call kcadm config credentials --server http://localhost:8080/auth --realm master --user admin --password admin
REM ***************** CREATING NEW USER *****************
SET usernameVar=leonie_e
echo ------- Creating User: %usernameVar% -------
call kcadm create users -s username=%usernameVar% -s firstName=Leonie -s lastName=Erfasser -s enabled=true -r Elogbook
call kcadm set-password -r Elogbook --username %usernameVar% --new-password %usernameVar%
echo pwd set
call kcadm add-roles --uusername %usernameVar% --rolename grid-failure-access --rolename grid-failure-creator -r Elogbook
echo roles set
REM ***************** CREATING NEW USER *****************
SET usernameVar=marie_b
echo ------- Creating User: %usernameVar% -------
call kcadm create users -s username=%usernameVar% -s firstName=Marie -s lastName=Bearbeiter -s enabled=true -r Elogbook
call kcadm set-password -r Elogbook --username %usernameVar% --new-password %usernameVar%
echo pwd set
call kcadm add-roles --uusername %usernameVar% --rolename grid-failure-access --rolename grid-failure-processor -r Elogbook
echo roles set
REM ***************** CREATING NEW USER *****************
SET usernameVar=laura_p
echo ------- Creating User: %usernameVar% -------
call kcadm create users -s username=%usernameVar% -s firstName=Laura -s lastName=Öffentlichkeitsarbeit -s enabled=true -r Elogbook
call kcadm set-password -r Elogbook --username %usernameVar% --new-password %usernameVar%
echo pwd set
call kcadm add-roles --uusername %usernameVar% --rolename grid-failure-access --rolename grid-failure-public-relations -r Elogbook
echo roles set
REM ***************** CREATING NEW USER *****************
SET usernameVar=liam_e
echo ------- Creating User: %usernameVar% -------
call kcadm create users -s username=%usernameVar% -s firstName=Liam -s lastName=Erfasser -s enabled=true -r Elogbook
call kcadm set-password -r Elogbook --username %usernameVar% --new-password %usernameVar%
echo pwd set
call kcadm add-roles --uusername %usernameVar% --rolename grid-failure-access --rolename grid-failure-creator -r Elogbook
echo roles set
REM ***************** CREATING NEW USER *****************
SET usernameVar=theo_b
echo ------- Creating User: %usernameVar% -------
call kcadm create users -s username=%usernameVar% -s firstName=Theo -s lastName=Bearbeiter -s enabled=true -r Elogbook
call kcadm set-password -r Elogbook --username %usernameVar% --new-password %usernameVar%
echo pwd set
call kcadm add-roles --uusername %usernameVar% --rolename grid-failure-access --rolename grid-failure-processor -r Elogbook
echo roles set
REM ***************** CREATING NEW USER *****************
SET usernameVar=tom_p
echo ------- Creating User: %usernameVar% -------
call kcadm create users -s username=%usernameVar% -s firstName=Tom -s lastName=Öffentlichkeitsarbeit -s enabled=true -r Elogbook
call kcadm set-password -r Elogbook --username %usernameVar% --new-password %usernameVar%
echo pwd set
call kcadm add-roles --uusername %usernameVar% --rolename grid-failure-access --rolename grid-failure-public-relations -r Elogbook
echo roles set
echo ------- Finished -------
#!/bin/sh
echo ------- Login Keycloak -------
sh kcadm.sh config credentials --server http://localhost:8380/auth --realm master --user admin --password admin
realmVar="OpenKRealm"
# ***************** CREATING NEW USER *****************
usernameVar="leonie_e"
echo ------- Creating User: $usernameVar -------
sh kcadm.sh create users -s username=$usernameVar -s firstName=Leonie -s lastName=Erfasser -s enabled=true -r $realmVar
sh kcadm.sh set-password -r $realmVar --username $usernameVar --new-password $usernameVar
echo pwd set
sh kcadm.sh add-roles --uusername $usernameVar --rolename grid-failure-access --rolename grid-failure-creator -r $realmVar
echo roles set
# ***************** CREATING NEW USER *****************
usernameVar="marie_b"
echo ------- Creating User: $usernameVar -------
sh kcadm.sh create users -s username=$usernameVar -s firstName=Marie -s lastName=Bearbeiter -s enabled=true -r $realmVar
sh kcadm.sh set-password -r $realmVar --username $usernameVar --new-password $usernameVar
echo pwd set
sh kcadm.sh add-roles --uusername $usernameVar --rolename grid-failure-access --rolename grid-failure-processor -r $realmVar
echo roles set
# ***************** CREATING NEW USER *****************
usernameVar="laura_p"
echo ------- Creating User: $usernameVar -------
sh kcadm.sh create users -s username=$usernameVar -s firstName=Laura -s lastName=Öffentlichkeitsarbeit -s enabled=true -r $realmVar
sh kcadm.sh set-password -r $realmVar --username $usernameVar --new-password $usernameVar
echo pwd set
sh kcadm.sh add-roles --uusername $usernameVar --rolename grid-failure-access --rolename grid-failure-public-relations -r $realmVar
echo roles set
# ***************** CREATING NEW USER *****************
usernameVar="liam_e"
echo ------- Creating User: $usernameVar -------
sh kcadm.sh create users -s username=$usernameVar -s firstName=Liam -s lastName=Erfasser -s enabled=true -r $realmVar
sh kcadm.sh set-password -r $realmVar --username $usernameVar --new-password $usernameVar
echo pwd set
sh kcadm.sh add-roles --uusername $usernameVar --rolename grid-failure-access --rolename grid-failure-creator -r $realmVar
echo roles set
# ***************** CREATING NEW USER *****************
usernameVar="theo_b"
echo ------- Creating User: $usernameVar -------
sh kcadm.sh create users -s username=$usernameVar -s firstName=Theo -s lastName=Bearbeiter -s enabled=true -r $realmVar
sh kcadm.sh set-password -r $realmVar --username $usernameVar --new-password $usernameVar
echo pwd set
sh kcadm.sh add-roles --uusername $usernameVar --rolename grid-failure-access --rolename grid-failure-processor -r $realmVar
echo roles set
# ***************** CREATING NEW USER *****************
usernameVar="tom_p"
echo ------- Creating User: $usernameVar -------
sh kcadm.sh create users -s username=$usernameVar -s firstName=Tom -s lastName=Öffentlichkeitsarbeit -s enabled=true -r $realmVar
sh kcadm.sh set-password -r $realmVar --username $usernameVar --new-password $usernameVar
echo pwd set
sh kcadm.sh add-roles --uusername $usernameVar --rolename grid-failure-access --rolename grid-failure-public-relations -r $realmVar
echo roles set
echo ------- Finished -------
...@@ -3,11 +3,13 @@ package org.eclipse.openk.gridfailureinformation; ...@@ -3,11 +3,13 @@ package org.eclipse.openk.gridfailureinformation;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
@SpringBootApplication @SpringBootApplication
@EnableSwagger2 @EnableSwagger2
@EnableFeignClients @EnableFeignClients
@EnableJpaAuditing(modifyOnCreate=true, auditorAwareRef="auditProvider")
public class GridFailureInformationApplication { public class GridFailureInformationApplication {
......
package org.eclipse.openk.gridfailureinformation.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.domain.AuditorAware;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import java.util.Optional;
@Configuration
public class JpaAuditConfig {
@Bean
public AuditorAware<String> auditProvider() {
return () -> Optional.ofNullable(SecurityContextHolder.getContext())
.map(SecurityContext::getAuthentication)
.filter(Authentication::isAuthenticated)
.map(Authentication::getName);
}
}
\ No newline at end of file
...@@ -76,7 +76,7 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter { ...@@ -76,7 +76,7 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
token.getRealmAccess().getRoles().stream() token.getRealmAccess().getRoles().stream()
.forEach( x -> authorities.add(new SimpleGrantedAuthority("ROLE_"+x.toUpperCase()))); .forEach( x -> authorities.add(new SimpleGrantedAuthority("ROLE_"+x.toUpperCase())));
UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken(token.getName(), null, authorities); UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken(token.getPreferredUsername(), null, authorities);
auth.setDetails(bearerTkn); auth.setDetails(bearerTkn);
context.setAuthentication(auth); context.setAuthentication(auth);
......
/*
*******************************************************************************
* Copyright (c) 2019 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************
*/
package org.eclipse.openk.gridfailureinformation.controller;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.log4j.Log4j2;
import org.eclipse.openk.gridfailureinformation.service.LogoutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Log4j2
@RestController
@RequestMapping("/logout")
public class LogoutController {
@Autowired
private LogoutService logoutService;
@ApiOperation(value = "Logout vom Auth-und-Auth-Modul")
@ApiResponses(value = {@ApiResponse(code = 204, message = "Erfolgreich durchgeführt")})
@GetMapping
public ResponseEntity logout() {
logoutService.logout();
return ResponseEntity.ok().build();
}
}
...@@ -15,6 +15,11 @@ ...@@ -15,6 +15,11 @@
package org.eclipse.openk.gridfailureinformation.model; package org.eclipse.openk.gridfailureinformation.model;
import lombok.Data; import lombok.Data;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*; import javax.persistence.*;
import java.util.Date; import java.util.Date;
...@@ -22,6 +27,7 @@ import java.util.UUID; ...@@ -22,6 +27,7 @@ import java.util.UUID;
@Data @Data
@Entity @Entity
@EntityListeners(AuditingEntityListener.class)
public class TblFailureInformation { public class TblFailureInformation {
@Id @Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tbl_failure_information_id_seq") @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tbl_failure_information_id_seq")
...@@ -48,6 +54,22 @@ public class TblFailureInformation { ...@@ -48,6 +54,22 @@ public class TblFailureInformation {
private String stationCoords; private String stationCoords;
private String radius; private String radius;
@CreatedDate
@Column(name = "create_date")
private Date createDate;
@CreatedBy
@Column(name = "create_user")
private String createUser;
@LastModifiedDate
@Column(name = "mod_date")
private Date modDate;
@LastModifiedBy
@Column(name = "mod_user")
private String modUser;
@ManyToOne @ManyToOne
@JoinColumn( name = "fk_ref_failure_classification") @JoinColumn( name = "fk_ref_failure_classification")
private RefFailureClassification refFailureClassification; private RefFailureClassification refFailureClassification;
......
...@@ -54,9 +54,6 @@ public class FailureInformationService { ...@@ -54,9 +54,6 @@ public class FailureInformationService {
@Autowired @Autowired
private StatusRepository statusRepository; private StatusRepository statusRepository;
@Autowired
private FailureInformationMapper gridFailureInformationMapper;
public FailureInformationDto findFailureInformation( UUID uuid ) { public FailureInformationDto findFailureInformation( UUID uuid ) {
return failureInformationMapper.toFailureInformationDto( return failureInformationMapper.toFailureInformationDto(
failureInformationRepository.findByUuid( uuid ) failureInformationRepository.findByUuid( uuid )
...@@ -68,12 +65,12 @@ public class FailureInformationService { ...@@ -68,12 +65,12 @@ public class FailureInformationService {
} }
public FailureInformationDto insertFailureInfo(FailureInformationDto failureInfoDto){ public FailureInformationDto insertFailureInfo(FailureInformationDto failureInfoDto){
TblFailureInformation tblFailureInformationToSave = gridFailureInformationMapper.toTblFailureInformation(failureInfoDto); TblFailureInformation tblFailureInformationToSave = failureInformationMapper.toTblFailureInformation(failureInfoDto);
tblFailureInformationToSave.setUuid(UUID.randomUUID()); tblFailureInformationToSave.setUuid(UUID.randomUUID());
tblFailureInformationToSave.setVersionNumber(1L); tblFailureInformationToSave.setVersionNumber(1L);
setFromGridFailureInformationDto(tblFailureInformationToSave, failureInfoDto); setFromGridFailureInformationDto(tblFailureInformationToSave, failureInfoDto);
return gridFailureInformationMapper.toFailureInformationDto(failureInformationRepository.save(tblFailureInformationToSave)); return failureInformationMapper.toFailureInformationDto(failureInformationRepository.save(tblFailureInformationToSave));
} }
@Transactional @Transactional
...@@ -82,7 +79,7 @@ public class FailureInformationService { ...@@ -82,7 +79,7 @@ public class FailureInformationService {
TblFailureInformation tblFailureInformation = failureInformationRepository.findByUuid(failureInfoDto.getUuid()) TblFailureInformation tblFailureInformation = failureInformationRepository.findByUuid(failureInfoDto.getUuid())
.orElseThrow(() -> new NotFoundException("failure.info.uuid.not.existing")); .orElseThrow(() -> new NotFoundException("failure.info.uuid.not.existing"));
TblFailureInformation tblFailureInformationToSave = gridFailureInformationMapper.toTblFailureInformation(failureInfoDto); TblFailureInformation tblFailureInformationToSave = failureInformationMapper.toTblFailureInformation(failureInfoDto);
tblFailureInformationToSave.setId(tblFailureInformation.getId()); tblFailureInformationToSave.setId(tblFailureInformation.getId());
setFromGridFailureInformationDto(tblFailureInformationToSave, failureInfoDto); setFromGridFailureInformationDto(tblFailureInformationToSave, failureInfoDto);
...@@ -92,7 +89,7 @@ public class FailureInformationService { ...@@ -92,7 +89,7 @@ public class FailureInformationService {
tblFailureInformationToSave.setVersionNumber(countVersions + 1); tblFailureInformationToSave.setVersionNumber(countVersions + 1);
TblFailureInformation savedFailureInformation = failureInformationRepository.save(tblFailureInformationToSave); TblFailureInformation savedFailureInformation = failureInformationRepository.save(tblFailureInformationToSave);
return gridFailureInformationMapper.toFailureInformationDto(savedFailureInformation); return failureInformationMapper.toFailureInformationDto(savedFailureInformation);
} }
private void setFromGridFailureInformationDto( TblFailureInformation destTblFailureInformation, FailureInformationDto sourceDto ) { private void setFromGridFailureInformationDto( TblFailureInformation destTblFailureInformation, FailureInformationDto sourceDto ) {
......
/*
*******************************************************************************
* Copyright (c) 2019 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************
*/
package org.eclipse.openk.gridfailureinformation.service;
import org.eclipse.openk.gridfailureinformation.api.AuthNAuthApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Service;
@Service
public class LogoutService {
@Autowired
AuthNAuthApi authNAuthApi;
public void logout() {
String bearerToken = (String) SecurityContextHolder.getContext().getAuthentication().getDetails();
authNAuthApi.logout(bearerToken);
}
}
...@@ -52,6 +52,14 @@ public class FailureInformationDto implements Serializable { ...@@ -52,6 +52,14 @@ public class FailureInformationDto implements Serializable {
private String stationCoords; private String stationCoords;
private String radius; private String radius;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
private Date createDate;
private String createUser;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
private Date modDate;
private String modUser;
private UUID failureClassificationId; private UUID failureClassificationId;
private String failureClassification; private String failureClassification;
......
...@@ -44,12 +44,8 @@ feign: ...@@ -44,12 +44,8 @@ feign:
connectTimeout: 60000 connectTimeout: 60000
readTimeout: 60000 readTimeout: 60000
cors: cors:
allowedOrigins: http://localhost:8080
corsEnabled: false corsEnabled: false
logging:
file: grid-failure-info.log
--- ---
spring: spring:
...@@ -83,7 +79,6 @@ server: ...@@ -83,7 +79,6 @@ server:
port: 9165 port: 9165
cors: cors:
allowedOrigins: http://localhost:8080
corsEnabled: true corsEnabled: true
...@@ -101,7 +96,6 @@ server: ...@@ -101,7 +96,6 @@ server:
port: 9166 port: 9166
cors: cors:
allowedOrigins: http://localhost:8080
corsEnabled: true corsEnabled: true
--- ---
...@@ -136,5 +130,4 @@ authNAuthService: ...@@ -136,5 +130,4 @@ authNAuthService:
listOfServers: http://localhost:8080 listOfServers: http://localhost:8080
cors: cors:
allowedOrigins: http://localhost:8080
corsEnabled: true corsEnabled: true
\ No newline at end of file
...@@ -30,7 +30,7 @@ gridFailureInformation: ...@@ -30,7 +30,7 @@ gridFailureInformation:
jwt: jwt:
tokenHeader: Authorization tokenHeader: Authorization
useStaticJwt: true useStaticJwt: false
staticJwt: eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2l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bWlseV9uYW1lIjoiVGVzdGVyTGFzdG5hbWVfcndhIn0.DAYXuv4tKn8RXqO1jyttnD-tF4nShUBQyfe4bKbAiPAyY2x5YbAf3M4eXnLrGqo8-loGKldICC28bL0LaMA3KKkQEOfW5sfpGqoN6212vs89mOklt0TJYc5PMXwFgJ5WC_TKjdwq7-aaDafOEWehV0U1ut3s-94ovNYIEn29nzXm2W1ldoXJEq03F880jlysQ5zlRvGF7eXEEpFfI2URyyNQ2UWh0Ssfq-gOAt2pbF1u6prA5RfvUmZ3v1eu21YLGZtgqPqxb1l6odyH3ip15j_HdgnTeo52ymxuRUj65Mskme3V5ev2DitHI9vZgnpV8Idhb4TTWliBeGCOMfDFCg
services: services:
...@@ -42,9 +42,13 @@ authNAuthService: ...@@ -42,9 +42,13 @@ authNAuthService:
listOfServers: http://entopkon:8880 listOfServers: http://entopkon:8880
cors: cors:
allowedOrigins: http://localhost:8080 corsEnabled: true
corsEnabled: false
logging: ---
file: grid-failure-info.log
spring:
profiles: dev-db
datasource:
url: jdbc:postgresql://entopticadirx:5432/GridFailureInfoDevServer
username: gfi_service
password: gfi_service
\ No newline at end of file
-----------------------------------------------------------------------------------
-- *******************************************************************************
-- * Copyright (c) 2019 Contributors to the Eclipse Foundation
-- *
-- * See the NOTICE file(s) distributed with this work for additional
-- * information regarding copyright ownership.
-- *
-- * This program and the accompanying materials are made available under the
-- * terms of the Eclipse Public License v. 2.0 which is available at
-- * http://www.eclipse.org/legal/epl-2.0.
-- *
-- * SPDX-License-Identifier: EPL-2.0
-- *******************************************************************************
-----------------------------------------------------------------------------------
-- CREATE ROLE GFI_SERVICE LOGIN
-- NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
-- ALTER ROLE GFI_SERVICE with password 'gfi_service';
DROP TABLE IF EXISTS public.VERSION CASCADE;
DROP TABLE IF EXISTS public.TBL_FAILURE_INFORMATION CASCADE;
DROP SEQUENCE IF EXISTS public.TBL_FAILURE_INFORMATION_ID_SEQ;
DROP TABLE IF EXISTS public.REF_STATUS CASCADE;
DROP SEQUENCE IF EXISTS public.REF_STATUS_ID_SEQ;
DROP TABLE IF EXISTS public.REF_BRANCH CASCADE;
DROP SEQUENCE IF EXISTS public.REF_BRANCH_ID_SEQ;
DROP TABLE IF EXISTS public.REF_FAILURE_CLASSIFICATION CASCADE;
DROP SEQUENCE IF EXISTS public.REF_FAILURE_CLASSIFICATION_ID_SEQ;
DROP TABLE IF EXISTS public.REF_FAILURE_TYPE CASCADE;
DROP SEQUENCE IF EXISTS public.REF_FAILURE_TYPE_ID_SEQ;
-- ---------------------------------------------
-- TABLE VERSION
-- ---------------------------------------------
CREATE TABLE public.VERSION
(
ID integer NOT NULL,
VERSION character varying(50) NOT NULL,
CONSTRAINT REF_VERSION_PKEY PRIMARY KEY (id)
);
ALTER TABLE public.VERSION
OWNER TO GFI_SERVICE;
GRANT ALL ON TABLE public.VERSION TO GFI_SERVICE;
INSERT INTO public.VERSION (ID, VERSION) VALUES ( 1, '00-DEV' );
-- ---------------------------------------------
-- TABLE REF_STATUS
-- ---------------------------------------------
CREATE SEQUENCE public.ref_status_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE public.ref_status_id_seq
OWNER TO GFI_SERVICE;
CREATE TABLE public.REF_STATUS
(
ID integer NOT NULL DEFAULT nextval('REF_STATUS_ID_SEQ'::regclass),
UUID uuid NOT NULL,
STATUS character varying(50) NOT NULL,
IS_INTERNAL boolean NOT NULL,
IS_EXTERNAL boolean NOT NULL,
CONSTRAINT REF_STATUS_PKEY PRIMARY KEY (id)
);
ALTER TABLE public.REF_STATUS
OWNER TO GFI_SERVICE;
GRANT ALL ON TABLE public.REF_STATUS TO GFI_SERVICE;
INSERT INTO public.REF_STATUS (UUID, STATUS, IS_INTERNAL, IS_EXTERNAL) VALUES ( 'acabc8f6-2cf3-485a-a4f8-68d178c7df45', 'neu', TRUE, TRUE );
INSERT INTO public.REF_STATUS (UUID, STATUS, IS_INTERNAL, IS_EXTERNAL) VALUES ( 'a6cda99d-9f41-4637-9d9b-04f95ea352ec', 'bestätigt', TRUE, TRUE );
INSERT INTO public.REF_STATUS (UUID, STATUS, IS_INTERNAL, IS_EXTERNAL) VALUES ( '23fc0254-cc3d-4371-97ad-54ef733008ae', 'aktiv', TRUE, FALSE );
INSERT INTO public.REF_STATUS (UUID, STATUS, IS_INTERNAL, IS_EXTERNAL) VALUES ( '9374219a-7419-4b72-899d-cd0576d85cdb', 'geschlossen', TRUE, TRUE );
-- ---------------------------------------------
-- TABLE REF_FAILURE_CLASSIFICATION