diff --git a/src/main/java/com/example/pladialmserver/booking/dto/response/AdminBookingRes.java b/src/main/java/com/example/pladialmserver/booking/dto/response/AdminBookingRes.java index 6cad25ea..de15d7ec 100644 --- a/src/main/java/com/example/pladialmserver/booking/dto/response/AdminBookingRes.java +++ b/src/main/java/com/example/pladialmserver/booking/dto/response/AdminBookingRes.java @@ -10,8 +10,10 @@ @Builder public class AdminBookingRes { - @Schema(type = "Long", description = "회의실 Id / 자원 Id", example = "1") + @Schema(type = "Long", description = "예약 Id", example = "1") private Long id; + @Schema(type = "Long", description = "회의실 Id / 자원 Id", example = "1") + private Long targetId; @Schema(type = "String", description = "회의실명 / 자원명", example = "'회의실1' / '카메라1'") private String name; @Schema(type = "String", description = "회의실 위치 / 카테고리", example = "'401호' / '촬영장비'") @@ -24,18 +26,22 @@ public class AdminBookingRes { private String reservatorName; @Schema(type = "String", description = "예약자 전화번호", example = "010-4158-8124") private String reservatorPhone; + @Schema(type = "String", description = "이용목적", example = "드라마 촬영") + private String memo; @Schema(type = "String", description = "상태", example = "'예약중' / '사용중'") private String status; public static AdminBookingRes toDto(OfficeBooking officeBooking){ return AdminBookingRes.builder() .id(officeBooking.getOfficeBookingId()) + .targetId(officeBooking.getOffice().getOfficeId()) .name(officeBooking.getOffice().getName()) .detailInfo(officeBooking.getOffice().getLocation()) .startDateTime(DateTimeUtil.dateAndTimeToString(officeBooking.getDate(),officeBooking.getStartTime())) .endDateTime(DateTimeUtil.dateAndTimeToString(officeBooking.getDate(),officeBooking.getEndTime())) .reservatorName(officeBooking.getUser().getName()) .reservatorPhone(officeBooking.getUser().getPhone()) + .memo(officeBooking.getMemo()) .status(officeBooking.getStatus().getValue()) .build(); } diff --git a/src/main/java/com/example/pladialmserver/booking/dto/response/BookingRes.java b/src/main/java/com/example/pladialmserver/booking/dto/response/BookingRes.java index f7fcf297..5a8510d7 100644 --- a/src/main/java/com/example/pladialmserver/booking/dto/response/BookingRes.java +++ b/src/main/java/com/example/pladialmserver/booking/dto/response/BookingRes.java @@ -12,8 +12,10 @@ @Builder public class BookingRes { - @Schema(type = "Long", description = "Id", example = "1") + @Schema(type = "Long", description = "예약 Id", example = "1") private Long id; + @Schema(type = "Long", description = "예약 대상 Id", example = "1") + private Long targetId; @Schema(type = "String", description = "회의실명 / 장비명 / 차량명", example = "'회의실1' / '카메라1' / '벤틀리'") private String name; @Schema(type = "String", description = "회의실 위치 / 보관장소", example = "'401호' / '3층 A홀' / '주차장'") @@ -30,6 +32,7 @@ public class BookingRes { public static BookingRes toDto(OfficeBooking officeBooking) { return BookingRes.builder() .id(officeBooking.getOfficeBookingId()) + .targetId(officeBooking.getOffice().getOfficeId()) .name(officeBooking.getOffice().getName()) .detailInfo(officeBooking.getOffice().getLocation()) .startDateTime(DateTimeUtil.dateAndTimeToString(officeBooking.getDate(), officeBooking.getStartTime())) @@ -42,6 +45,7 @@ public static BookingRes toDto(OfficeBooking officeBooking) { public static BookingRes toDto(ResourceBooking resourceBooking) { return BookingRes.builder() .id(resourceBooking.getResourceBookingId()) + .targetId(resourceBooking.getResource().getResourceId()) .name(resourceBooking.getResource().getName()) .detailInfo(resourceBooking.getResource().getLocation()) .startDateTime(DateTimeUtil.dateTimeToString(resourceBooking.getStartDate())) @@ -54,6 +58,7 @@ public static BookingRes toDto(ResourceBooking resourceBooking) { public static BookingRes toDto(CarBooking carBooking) { return BookingRes.builder() .id(carBooking.getCarBookingId()) + .targetId(carBooking.getCar().getCarId()) .name(carBooking.getCar().getName()) .detailInfo(carBooking.getCar().getLocation()) .startDateTime(DateTimeUtil.dateTimeToString(carBooking.getStartDate())) diff --git a/src/main/java/com/example/pladialmserver/product/dto/response/AdminProductRes.java b/src/main/java/com/example/pladialmserver/product/dto/response/AdminProductRes.java index c31b142e..4f9fc6c8 100644 --- a/src/main/java/com/example/pladialmserver/product/dto/response/AdminProductRes.java +++ b/src/main/java/com/example/pladialmserver/product/dto/response/AdminProductRes.java @@ -10,8 +10,10 @@ @Data @Builder public class AdminProductRes { - @Schema(type = "Long", description = "Id", example = "1") + @Schema(type = "Long", description = "예약 Id", example = "1") private Long id; + @Schema(type = "Long", description = "예약 대상 Id", example = "1") + private Long targetId; @Schema(type = "String", description = "장비 이름", example = "'벤츠'") private String name; @Schema(type = "String", description = "보관장소", example = "'4층 창고'") @@ -24,18 +26,22 @@ public class AdminProductRes { private String reservatorName; @Schema(type = "String", description = "예약자 전화번호", example = "010-0000-0000") private String reservatorPhone; + @Schema(type = "String", description = "이용목적", example = "드라마 촬영") + private String memo; @Schema(type = "String", description = "상태", example = "'예약중' / '사용중'") private String status; public static AdminProductRes toDto(ResourceBooking resourceBooking){ return AdminProductRes.builder() .id(resourceBooking.getResourceBookingId()) + .targetId(resourceBooking.getResource().getResourceId()) .name(resourceBooking.getResource().getName()) .location(resourceBooking.getResource().getLocation()) .startDateTime(DateTimeUtil.dateTimeToString(resourceBooking.getStartDate())) .endDateTime(DateTimeUtil.dateTimeToString(resourceBooking.getEndDate())) .reservatorName(resourceBooking.getUser().getName()) .reservatorPhone(resourceBooking.getUser().getPhone()) + .memo(resourceBooking.getMemo()) .status(resourceBooking.getStatus().getValue()) .build(); } @@ -43,12 +49,14 @@ public static AdminProductRes toDto(ResourceBooking resourceBooking){ public static AdminProductRes toDto(CarBooking carBooking){ return AdminProductRes.builder() .id(carBooking.getCarBookingId()) + .targetId(carBooking.getCar().getCarId()) .name(carBooking.getCar().getName()) .location(carBooking.getCar().getLocation()) .startDateTime(DateTimeUtil.dateTimeToString(carBooking.getStartDate())) .endDateTime(DateTimeUtil.dateTimeToString(carBooking.getEndDate())) .reservatorName(carBooking.getUser().getName()) .reservatorPhone(carBooking.getUser().getPhone()) + .memo(carBooking.getMemo()) .status(carBooking.getStatus().getValue()) .build(); }