Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: EmergencyReport 테이블에 신고사유 필드 추가 #18

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ public static class EmergencyReportCreateRequest {
private String time;
private double latitude;
private double longitude;
private String contents;

@Builder
public EmergencyReportCreateRequest(String time, double latitude, double longitude) {
public EmergencyReportCreateRequest(String time, double latitude, double longitude, String contents) {
this.time = time;
this.latitude = latitude;
this.longitude = longitude;
this.contents = contents;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ public static class EmergencyReportInHourResponse {
private String time;
private double latitude;
private double longitude;
private String contents;

@Builder
public EmergencyReportInHourResponse(String time, double latitude, double longitude) {
public EmergencyReportInHourResponse(String time, double latitude, double longitude, String contents) {
this.time = time;
this.latitude = latitude;
this.longitude = longitude;
this.contents = contents;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public static EmergencyReport mapToEntity(EmergencyReportRequest.EmergencyReport
.time(LocalDateTime.parse(emergencyReportCreateRequest.getTime(), formatter))
.latitude(emergencyReportCreateRequest.getLatitude())
.longitude(emergencyReportCreateRequest.getLongitude())
.contents(emergencyReportCreateRequest.getContents())
.build();
}
public static EmergencyReportResponse.EmergencyReportInHourResponse mapToEmergencyReportInHourResponse(EmergencyReport emergencyReport) {
Expand All @@ -23,6 +24,7 @@ public static EmergencyReportResponse.EmergencyReportInHourResponse mapToEmergen
.time(emergencyReport.getTime().format(formatter))
.latitude(emergencyReport.getLatitude())
.longitude(emergencyReport.getLongitude())
.contents(emergencyReport.getContents())
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ public class EmergencyReport {

private double longitude;
private double latitude;
private String contents;

@Builder
public EmergencyReport(LocalDateTime time, double longitude, double latitude) {
public EmergencyReport(LocalDateTime time, double longitude, double latitude, String contents) {
this.time = time;
this.longitude = longitude;
this.latitude = latitude;
this.contents = contents;
}
}
Loading