From 3152272eaf9ace6a64f20f43acc96a308af3a406 Mon Sep 17 00:00:00 2001 From: rokibulislam <rrcucse.11@gmail.com> Date: Sun, 21 Apr 2024 01:05:35 +0200 Subject: [PATCH] update flights-service dao --- .../java/cz/muni/fi/pa165/api/flight/IssueReport.java | 1 + .../fi/pa165/api/flight/requests/FlightRequest.java | 4 ++-- .../pa165/api/flight/requests/IssueReportRequest.java | 1 + .../src/main/java/cz/muni/fi/pa165/dao/Flight.java | 6 ++---- .../main/java/cz/muni/fi/pa165/dao/IssueReport.java | 10 +--------- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/airport-manager-api/src/main/java/cz/muni/fi/pa165/api/flight/IssueReport.java b/airport-manager-api/src/main/java/cz/muni/fi/pa165/api/flight/IssueReport.java index d931de0..4530882 100644 --- a/airport-manager-api/src/main/java/cz/muni/fi/pa165/api/flight/IssueReport.java +++ b/airport-manager-api/src/main/java/cz/muni/fi/pa165/api/flight/IssueReport.java @@ -12,6 +12,7 @@ import java.util.UUID; public class IssueReport { private UUID id; + private UUID planeId; private UUID flightEncountered; private String description; diff --git a/airport-manager-api/src/main/java/cz/muni/fi/pa165/api/flight/requests/FlightRequest.java b/airport-manager-api/src/main/java/cz/muni/fi/pa165/api/flight/requests/FlightRequest.java index 15919b2..a22078c 100644 --- a/airport-manager-api/src/main/java/cz/muni/fi/pa165/api/flight/requests/FlightRequest.java +++ b/airport-manager-api/src/main/java/cz/muni/fi/pa165/api/flight/requests/FlightRequest.java @@ -11,7 +11,7 @@ import java.util.UUID; @AllArgsConstructor public class FlightRequest { - private String origin; - private String destination; + private UUID origin; + private UUID destination; private UUID planeId; } diff --git a/airport-manager-api/src/main/java/cz/muni/fi/pa165/api/flight/requests/IssueReportRequest.java b/airport-manager-api/src/main/java/cz/muni/fi/pa165/api/flight/requests/IssueReportRequest.java index 07ace5c..0eea9ee 100644 --- a/airport-manager-api/src/main/java/cz/muni/fi/pa165/api/flight/requests/IssueReportRequest.java +++ b/airport-manager-api/src/main/java/cz/muni/fi/pa165/api/flight/requests/IssueReportRequest.java @@ -12,4 +12,5 @@ public class IssueReportRequest { private UUID flightEncountered; private String description; + private UUID planeId; } diff --git a/airports-flight-service/src/main/java/cz/muni/fi/pa165/dao/Flight.java b/airports-flight-service/src/main/java/cz/muni/fi/pa165/dao/Flight.java index 3174fe4..b8134e1 100644 --- a/airports-flight-service/src/main/java/cz/muni/fi/pa165/dao/Flight.java +++ b/airports-flight-service/src/main/java/cz/muni/fi/pa165/dao/Flight.java @@ -17,12 +17,10 @@ public class Flight implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private UUID id; - private String origin; - private String destination; - + private UUID origin; + private UUID destination; private UUID planeId; - // @ElementCollection // private List<Long> pilotIds; // @ElementCollection diff --git a/airports-flight-service/src/main/java/cz/muni/fi/pa165/dao/IssueReport.java b/airports-flight-service/src/main/java/cz/muni/fi/pa165/dao/IssueReport.java index e41ed9c..55952fa 100644 --- a/airports-flight-service/src/main/java/cz/muni/fi/pa165/dao/IssueReport.java +++ b/airports-flight-service/src/main/java/cz/muni/fi/pa165/dao/IssueReport.java @@ -19,13 +19,5 @@ public class IssueReport implements Serializable { private UUID id; private UUID flightEncountered; private String description; - - public IssueReport( UUID flightEncountered, String description ) { - this.flightEncountered = flightEncountered; - this.description = description; - } - - public IssueReport() { - - } + private UUID planeId; } -- GitLab