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

Ignore: πŸ› The NotifyEnabled field has been added to the Get Chat Room API in Version 2 #225

Merged
merged 9 commits into from
Jan 22, 2025
Prev Previous commit
Next Next commit
feat: add chat-room detail response dto for v2
psychology50 committed Jan 22, 2025
commit 87c84ab1663d0a625ac8777f76b538714e7f274c
Original file line number Diff line number Diff line change
@@ -100,6 +100,48 @@ public static Detail from(ChatRoomRes.Info info) {
}
}

@Schema(description = "μ±„νŒ…λ°© 상세 정보 ver.2")
public record Detailv2(
@Schema(description = "μ±„νŒ…λ°© ID", type = "long")
Long id,
@Schema(description = "μ±„νŒ…λ°© 제λͺ©")
String title,
@Schema(description = "μ±„νŒ…λ°© μ„€λͺ…")
String description,
@Schema(description = "μ±„νŒ…λ°© λ°°κ²½ 이미지 URL")
String backgroundImageUrl,
@Schema(description = "μ±„νŒ…λ°© μ•Œλ¦Ό μ„€μ •")
boolean isNotifyEnabled,
@Schema(description = "μ±„νŒ…λ°© λΉ„κ³΅κ°œ μ—¬λΆ€")
boolean isPrivate,
@Schema(description = "μ–΄λ“œλ―Ό μ—¬λΆ€. μ±„νŒ…λ°©μ˜ κ΄€λ¦¬μžλΌλ©΄ true, μ•„λ‹ˆλΌλ©΄ false")
boolean isAdmin,
@Schema(description = "μ±„νŒ…λ°© μ°Έμ—¬μž 수")
int participantCount,
@Schema(description = "μ±„νŒ…λ°© κ°œμ„€μΌ")
@JsonSerialize(using = LocalDateTimeSerializer.class)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
LocalDateTime createdAt,
@Schema(description = "λ§ˆμ§€λ§‰ λ©”μ‹œμ§€ 정보. 없을 경우 null이 λ°˜ν™˜λœλ‹€.")
ChatRes.ChatDetail lastMessage,
@Schema(description = "읽지 μ•Šμ€ λ©”μ‹œμ§€ 수. 100 μ΄μƒμ˜ 값을 가지면, 100으둜 ν‘œμ‹œλœλ‹€.")
long unreadMessageCount
) {
public Detailv2(Long id, String title, String description, String backgroundImageUrl, boolean isNotifyEnabled, boolean isPrivate, boolean isAdmin, int participantCount, LocalDateTime createdAt, ChatRes.ChatDetail lastMessage, long unreadMessageCount) {
this.id = id;
this.title = title;
this.description = Objects.toString(description, "");
this.backgroundImageUrl = Objects.toString(backgroundImageUrl, "");
this.isNotifyEnabled = isNotifyEnabled;
this.isPrivate = isPrivate;
this.isAdmin = isAdmin;
this.participantCount = participantCount;
this.createdAt = createdAt;
this.lastMessage = lastMessage;
this.unreadMessageCount = (unreadMessageCount > 100) ? 100 : unreadMessageCount;
}
}

@Schema(description = "μ±„νŒ…λ°© 정보 (μ–΄λ“œλ―Όμš©)")
public record AdminView(
@Schema(description = "μ±„νŒ…λ°© ID", type = "long")