diff --git a/gateway/src/main/java/com/oing/controller/CalendarController.java b/gateway/src/main/java/com/oing/controller/CalendarController.java index 9d7ca52b..807e23ec 100644 --- a/gateway/src/main/java/com/oing/controller/CalendarController.java +++ b/gateway/src/main/java/com/oing/controller/CalendarController.java @@ -1,6 +1,7 @@ package com.oing.controller; import com.oing.component.TokenAuthenticationHolder; +import com.oing.domain.BannerImageType; import com.oing.domain.MemberPost; import com.oing.domain.MemberPostDailyCalendarDTO; import com.oing.dto.response.ArrayResponse; @@ -15,6 +16,7 @@ import java.time.LocalDate; import java.time.format.DateTimeFormatter; +import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.stream.IntStream; @@ -83,7 +85,9 @@ public ArrayResponse getMonthlyCalendar(String yearMonth) { public BannerResponse getBanner(String yearMonth) { return new BannerResponse( new Random().nextInt(0, 101), - new Random().nextInt(0, 28) + new Random().nextInt(0, 28), + new Random().nextInt(1, 5), + BannerImageType.values()[new Random().nextInt(BannerImageType.values().length)] ); } } diff --git a/gateway/src/main/java/com/oing/domain/BannerImageType.java b/gateway/src/main/java/com/oing/domain/BannerImageType.java new file mode 100644 index 00000000..38787d89 --- /dev/null +++ b/gateway/src/main/java/com/oing/domain/BannerImageType.java @@ -0,0 +1,14 @@ +package com.oing.domain; + +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor +public enum BannerImageType { + SKULL_FLAG("SKULL_FLAG"), + ALONE_WALING("ALONE_WALING"), + WE_ARE_FRIENDS("WE_ARE_FRIENDS"), + JEWELRY_TREASURE("JEWELRY_TREASURE"), + ; + + private final String imageCode; +} diff --git a/gateway/src/main/java/com/oing/dto/response/BannerResponse.java b/gateway/src/main/java/com/oing/dto/response/BannerResponse.java index ac8e0ab0..530be13b 100644 --- a/gateway/src/main/java/com/oing/dto/response/BannerResponse.java +++ b/gateway/src/main/java/com/oing/dto/response/BannerResponse.java @@ -1,5 +1,6 @@ package com.oing.dto.response; +import com.oing.domain.BannerImageType; import io.swagger.v3.oas.annotations.media.Schema; @Schema(description = "배너 응답") @@ -8,6 +9,12 @@ public record BannerResponse( Integer familyTopPercentage, @Schema(description = "가족 구성원 모두가 업로드한 날의 수", example = "3") - Integer allFamilyMembersUploadedDays + Integer allFamilyMembersUploadedDays, + + @Schema(description = "가족 활성도 레벨 (1 ~ 4)", example = "1") + Integer familyLevel, + + @Schema(description = "배너 이미지 타입", example = "SKULL_FLAG") + BannerImageType bannerImageType ) { }