From d4a17e8248e5dec78331ecb23e982f97caf92dab Mon Sep 17 00:00:00 2001 From: DongGeon Lee <71763322+himodu@users.noreply.github.com> Date: Mon, 20 May 2024 16:47:23 +0900 Subject: [PATCH] [ADD] booth "host" column add - booth "host" column add --- src/main/java/LlikelionKNU/KNUfest/domain/booth/dto/Booth.java | 1 + .../LlikelionKNU/KNUfest/domain/booth/dto/BoothDetail.java | 1 + .../LlikelionKNU/KNUfest/domain/booth/entity/BoothEntity.java | 3 +++ .../KNUfest/domain/booth/service/BoothServiceImpl.java | 2 ++ 4 files changed, 7 insertions(+) diff --git a/src/main/java/LlikelionKNU/KNUfest/domain/booth/dto/Booth.java b/src/main/java/LlikelionKNU/KNUfest/domain/booth/dto/Booth.java index 11331b0..764b8df 100644 --- a/src/main/java/LlikelionKNU/KNUfest/domain/booth/dto/Booth.java +++ b/src/main/java/LlikelionKNU/KNUfest/domain/booth/dto/Booth.java @@ -11,6 +11,7 @@ @AllArgsConstructor public class Booth { private String boothName; + private String host; private int likes; private String categori; private int boothnum; diff --git a/src/main/java/LlikelionKNU/KNUfest/domain/booth/dto/BoothDetail.java b/src/main/java/LlikelionKNU/KNUfest/domain/booth/dto/BoothDetail.java index 7256840..c9c1d59 100644 --- a/src/main/java/LlikelionKNU/KNUfest/domain/booth/dto/BoothDetail.java +++ b/src/main/java/LlikelionKNU/KNUfest/domain/booth/dto/BoothDetail.java @@ -10,6 +10,7 @@ @Builder public class BoothDetail { private String boothName; + private String host; private String boothDescription; private int likes; private String categori; diff --git a/src/main/java/LlikelionKNU/KNUfest/domain/booth/entity/BoothEntity.java b/src/main/java/LlikelionKNU/KNUfest/domain/booth/entity/BoothEntity.java index ca51ca3..9c6e2da 100644 --- a/src/main/java/LlikelionKNU/KNUfest/domain/booth/entity/BoothEntity.java +++ b/src/main/java/LlikelionKNU/KNUfest/domain/booth/entity/BoothEntity.java @@ -34,6 +34,9 @@ public class BoothEntity extends BasicEntity { @Column(name="description") private String description; + @Column(name="host") + private String host; + @OneToMany(mappedBy = "booth", fetch = FetchType.LAZY) private List commentEntityList; diff --git a/src/main/java/LlikelionKNU/KNUfest/domain/booth/service/BoothServiceImpl.java b/src/main/java/LlikelionKNU/KNUfest/domain/booth/service/BoothServiceImpl.java index 22538ab..af5108b 100644 --- a/src/main/java/LlikelionKNU/KNUfest/domain/booth/service/BoothServiceImpl.java +++ b/src/main/java/LlikelionKNU/KNUfest/domain/booth/service/BoothServiceImpl.java @@ -42,6 +42,7 @@ public AllBooth getAllbooth(String userHash) { for(BoothEntity booth : boothes){ boothDtos.add(Booth.builder() .boothName(booth.getBoothName()) + .host(booth.getHost()) .likes(booth.getLikes()) .categori(booth.getCategori()) .boothnum(booth.getBoothnum()) @@ -89,6 +90,7 @@ public BoothDetail getBooth(int boothnum, String categori, String userHash) { } return BoothDetail.builder() .boothName(booth.getBoothName()) + .host(booth.getHost()) .boothDescription(booth.getDescription()) .likes(booth.getLikes()) .boothnum(booth.getBoothnum())