Skip to content
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
@@ -1,13 +1,20 @@
package com.server.eventee.domain.comment.dto;

import io.swagger.v3.oas.annotations.media.Schema;

public class CommentRequest {

public record CommentDto(
@Schema(description = "댓글 내용", example = "안녕하세요")
String content,
@Schema(description = "댓글 단 게시글 ID", example = "7")
Long postId
){}

public record CommentUpdateDto(
@Schema(description = "댓글 ID", example = "7")
long id,
@Schema(description = "댓글 내용", example = "안녕하세요")
String content
){}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@

import com.server.eventee.domain.comment.model.Comment;
import com.server.eventee.domain.member.model.Member;
import io.swagger.v3.oas.annotations.media.Schema;

import java.time.LocalDateTime;
import java.util.List;

public class CommentResponse {
public record CommentDto(
@Schema(description = "댓글 ID", example = "7")
long commentId,
@Schema(description = "땟글 작성자", example = "")
String writer,
@Schema(description = "댓글 내용", example = "좋은 글 잘 읽었습니다!")
String content,
@Schema(description = "현재 로그인한 사용자가 작성한 댓글인지 여부", example = "true")
boolean isWrite,
@Schema(description = "댓글 작성 일시", example = "2025-11-24T10:15:30")
LocalDateTime createdAt
){
public static CommentDto from(Comment c, Member member){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,53 @@
package com.server.eventee.domain.group.dto;

import io.swagger.v3.oas.annotations.media.Schema;

public class GroupReqeust {

@Schema(description = "그룹 생성 요청 DTO")
public record GroupCreateDto(
@Schema(description = "이벤트 ID", example = "7")
long eventId,
@Schema(description = "그룹 이름", example = "개발 1팀")
String groupName,
@Schema(description = "그룹 설명", example = "백엔드 개발을 담당하는 팀입니다.")
String groupDescription,
@Schema(description = "그룹 이미지 URL", example = "https://eventee.s3.amazonaws.com/group/dev1.png")
String imgUrl
) {}

@Schema(description = "그룹 이동 요청 DTO")
public record GroupMoveDto(
@Schema(description = "기존 그룹 ID", example = "3")
long beforeGroupId,
@Schema(description = "이동할 그룹 ID", example = "5")
long afterGroupId,
@Schema(description = "이동할 멤버 닉네임", example = "yongdev")
String memberName
){
}

@Schema(description = "그룹 리더 변경 요청 DTO")
public record GroupUpdateLeaderDto(
@Schema(description = "그룹 ID", example = "4")
Long groupId,
@Schema(description = "새로운 리더 닉네임", example = "new_leader")
String leader
) {
}

@Schema(description = "그룹 정보 수정 요청 DTO")
public record GroupUpdateDto(

@Schema(description = "그룹 ID", example = "4")
Long groupId,
@Schema(description = "그룹 이름", example = "디자인팀")
String groupName,
@Schema(description = "그룹 설명", example = "디자인 및 UI/UX를 담당합니다.")
String groupDescription,
@Schema(description = "그룹 이미지 URL", example = "https://eventee.s3.amazonaws.com/group/design.png")
String imgUrl,
@Schema(description = "그룹 리더 닉네임", example = "design_master")
String leader
){
}
) {}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package com.server.eventee.domain.group.dto;

import com.server.eventee.domain.group.model.Group;
import io.swagger.v3.oas.annotations.media.Schema;

import java.util.List;

public class GroupResponse {

@Schema(description = "그룹 목록 응답 DTO(내 그룹 + 다른 그룹들)")
public record ListDto(
@Schema(description = "내 그룹 정보(null일 수 있음)")
GroupDto myGroup,
@Schema(description = "다른 그룹 리스트")
List<GroupDto> otherGroup
){
public static ListDto from(Group my, List<Group> others){
Expand All @@ -18,13 +22,20 @@ public static ListDto from(Group my, List<Group> others){
}
}

@Schema(description = "그룹 정보 DTO")
public record GroupDto(
@Schema(description = "그룹 ID", example = "4")
long groupId,
@Schema(description = "그룹 이름", example = "백엔드팀")
String groupName,
@Schema(description = "그룹 설명", example = "서버 개발을 담당하는 팀입니다.")
String groupDescription,
@Schema(description = "그룹 이미지 URL", example = "https://eventee.s3.amazonaws.com/group/backend.png")
String groupImg,
int groupNo, //그룹 이름 바뀔경우 순서를 위함.
String groupLeader //초기에는 Null값임
@Schema(description = "그룹 번호(정렬/순서를 위한 값)", example = "1")
int groupNo,
@Schema(description = "그룹 리더 닉네임(초기 null 가능)", example = "leader_kim")
String groupLeader
){
public static GroupDto from(Group group){
if(group == null) return null;
Expand Down
27 changes: 24 additions & 3 deletions src/main/java/com/server/eventee/domain/post/dto/PostRequest.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,42 @@
package com.server.eventee.domain.post.dto;

import io.swagger.v3.oas.annotations.media.Schema;

public class PostRequest {

@Schema(description = "게시글 생성 요청 DTO")
public record PostDto(

@Schema(description = "그룹 ID", example = "4")
Long groupId,

@Schema(description = "게시글 타입(TEXT 또는 VOTE)", example = "TEXT")
String type,

@Schema(description = "게시글 본문 내용", example = "오늘 저녁 7시에 회의 있습니다!")
String content,

@Schema(description = "투표 제목(VOTE 타입일 때만 사용)", example = "저녁 메뉴 투표")
String voteTitle,

@Schema(description = "투표 항목들( '_'로 구분)", example = "치킨, 피자, 햄버거")
String voteContent
){}
) {}

@Schema(description = "게시글 삭제 요청 DTO")
public record DeleteDto(

@Schema(description = "그룹 ID", example = "4")
Long groupId
){}
) {}

@Schema(description = "투표 요청 DTO")
public record VoteDto(

@Schema(description = "게시글 ID", example = "17")
Long postId,

@Schema(description = "투표 선택지 텍스트", example = "치킨")
String voteText
){}
) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@

import com.server.eventee.domain.member.model.Member;
import com.server.eventee.domain.post.model.VoteLog;
import io.swagger.v3.oas.annotations.media.Schema;

import java.util.List;

@Schema(description = "투표 로그 응답 DTO")
public record VoteLogResponseDto(
@Schema(description = "1번 옵션 투표 비율(%)", example = "62.5")
double op1Percent,
@Schema(description = "2번 옵션 투표 비율(%)", example = "37.5")
double op2Percent,
@Schema(description = "요청한 사용자 닉네임", example = "yongdev")
String writer,
@Schema(description = "요청한 사용자가 투표했는지 여부", example = "true")
boolean isVote,
@Schema(description = "요청한 사용자가 선택한 옵션 번호(1 또는 2)", example = "1")
Integer voteNUm
) {
public static VoteLogResponseDto from(List<VoteLog> logs,Member member){
Expand Down