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
Expand Up @@ -8,6 +8,65 @@
@Getter
@RequiredArgsConstructor
public enum GroupErrorCode implements ErrorCode {
NO_PERMISSION_TO_VIEW_BANNED_TARGETS(HttpStatus.FORBIDDEN,
"모임: BANNED(차단) 대상 목록 조회 권한이 없습니다. 모임 ID: %s 회원 ID: %s"
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message uses "BANNED(차단)" which mixes Korean with a parenthetical Korean translation. For consistency with other error messages, consider using only Korean: "모임: 차단된 대상 목록 조회 권한이 없습니다. 모임 ID: %s 회원 ID: %s"

Suggested change
"모임: BANNED(차단) 대상 목록 조회 권한이 없습니다. 모임 ID: %s 회원 ID: %s"
"모임: 차단된 대상 목록 조회 권한이 없습니다. 모임 ID: %s 회원 ID: %s"

Copilot uses AI. Check for mistakes.
),
NO_PERMISSION_TO_VIEW_KICK_TARGETS(HttpStatus.FORBIDDEN,
"모임: 강퇴 대상 목록 조회 권한이 없습니다. 모임 ID: %s 회원 ID: %s"
),
NO_PERMISSION_TO_VIEW_BAN_TARGETS(HttpStatus.FORBIDDEN,
"모임: 차단 대상 목록 조회 권한이 없습니다. 모임 ID: %s 회원 ID: %s"
),

NO_PERMISSION_TO_UNBAN(HttpStatus.FORBIDDEN,
"모임: 차단 해제 권한이 없습니다. 모임 ID: %s 회원 ID: %s"
),
GROUP_USER_STATUS_NOT_ALLOWED_TO_UNBAN(HttpStatus.BAD_REQUEST,
"모임: 현재 멤버십 상태에서는 차단 해제가 불가능합니다. 모임 ID: %s 회원 ID: %s 상태: %s"
),
GROUP_CANNOT_UNBAN_HOST(HttpStatus.BAD_REQUEST,
"모임: HOST는 차단 해제 대상이 될 수 없습니다. 모임 ID: %s 회원 ID: %s"
),
GROUP_CANNOT_BAN_IN_STATUS(HttpStatus.BAD_REQUEST,
"모임: 현재 모임 상태에서는 차단이 불가능합니다. 모임 ID: %s 모임 상태: %s"
),

NO_PERMISSION_TO_BAN(HttpStatus.FORBIDDEN,
"모임: 차단 권한이 없습니다. 모임 ID: %s 회원 ID: %s"
),

GROUP_USER_STATUS_NOT_ALLOWED_TO_BAN(HttpStatus.BAD_REQUEST,
"모임: 현재 멤버십 상태에서는 차단이 불가능합니다. 모임 ID: %s 회원 ID: %s 상태: %s"
),

GROUP_CANNOT_BAN_SELF(HttpStatus.BAD_REQUEST,
"모임: 자기 자신을 차단할 수 없습니다. 모임 ID: %s 회원 ID: %s"
),

GROUP_CANNOT_BAN_HOST(HttpStatus.BAD_REQUEST,
"모임: HOST는 차단할 수 없습니다. 모임 ID: %s 회원 ID: %s"
),


GROUP_CANNOT_KICK_IN_STATUS(HttpStatus.BAD_REQUEST,
"모임: 현재 모임 상태에서는 강퇴가 불가능합니다. 모임 ID: %s 모임 상태: %s"
),

NO_PERMISSION_TO_KICK(HttpStatus.FORBIDDEN,
"모임: 강퇴 권한이 없습니다. 모임 ID: %s 회원 ID: %s"
),

GROUP_USER_STATUS_NOT_ALLOWED_TO_KICK(HttpStatus.BAD_REQUEST,
"모임: 현재 멤버십 상태에서는 강퇴가 불가능합니다. 모임 ID: %s 회원 ID: %s 상태: %s"
),

GROUP_CANNOT_KICK_SELF(HttpStatus.BAD_REQUEST,
"모임: 자기 자신을 강퇴할 수 없습니다. 모임 ID: %s 회원 ID: %s"
),

GROUP_CANNOT_KICK_HOST(HttpStatus.BAD_REQUEST,
"모임: HOST는 강퇴할 수 없습니다. 모임 ID: %s 회원 ID: %s"
),
NO_PERMISSION_TO_REJECT_JOIN(HttpStatus.FORBIDDEN,
"모임: 참여 거절 권한이 없습니다. 모임 ID: %s 회원 ID: %s"
),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package team.wego.wegobackend.group.v2.application.dto.common;

import java.time.LocalDateTime;
import team.wego.wegobackend.group.v2.domain.entity.GroupUserV2Status;

public record AttendanceTargetItem(
Long userId,
String nickName,
String profileImage,
Long groupUserId,
GroupUserV2Status status,
LocalDateTime joinedAt
) {

}
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
package team.wego.wegobackend.group.v2.application.dto.common;

import java.time.LocalDateTime;
import team.wego.wegobackend.group.v2.domain.entity.GroupUserV2;
import team.wego.wegobackend.group.v2.domain.entity.GroupUserV2Status;

public record TargetMembership(
Long userId,
Long groupUserId,
GroupUserV2Status status,
LocalDateTime joinedAt,
LocalDateTime leftAt
GroupUserV2Status status
) {
public static TargetMembership of(Long userId, GroupUserV2 groupUserV2) {

public static TargetMembership of(Long userId, Long groupUserId, GroupUserV2Status status) {
return new TargetMembership(userId, groupUserId, status);
}

public static TargetMembership from(Long userId, GroupUserV2 target) {
return new TargetMembership(
userId,
groupUserV2.getId(),
groupUserV2.getStatus(),
groupUserV2.getJoinedAt(),
groupUserV2.getLeftAt()
target.getId(),
target.getStatus()
);
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package team.wego.wegobackend.group.v2.application.dto.response;

import java.time.LocalDateTime;
import java.util.List;
import team.wego.wegobackend.group.v2.application.dto.common.AttendanceTargetItem;

public record GetBanTargetsResponse(
Long groupId,
List<AttendanceTargetItem> targets,
LocalDateTime serverTime
) {

public static GetBanTargetsResponse of(Long groupId, List<AttendanceTargetItem> targets) {
return new GetBanTargetsResponse(groupId, targets, LocalDateTime.now());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package team.wego.wegobackend.group.v2.application.dto.response;

import java.time.LocalDateTime;
import java.util.List;
import team.wego.wegobackend.group.v2.application.dto.common.AttendanceTargetItem;

public record GetBannedTargetsResponse(
Long groupId,
List<AttendanceTargetItem> targets,
LocalDateTime serverTime
) {

public static GetBannedTargetsResponse of(Long groupId, List<AttendanceTargetItem> targets) {
return new GetBannedTargetsResponse(groupId, targets, LocalDateTime.now());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package team.wego.wegobackend.group.v2.application.dto.response;


Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an extra blank line after the package declaration. Remove the blank line on line 3 for consistency with Java code style conventions.

Suggested change

Copilot uses AI. Check for mistakes.
import java.time.LocalDateTime;
import java.util.List;
import team.wego.wegobackend.group.v2.application.dto.common.AttendanceTargetItem;

public record GetKickTargetsResponse(
Long groupId,
List<AttendanceTargetItem> targets,
LocalDateTime serverTime
) {

public static GetKickTargetsResponse of(Long groupId, List<AttendanceTargetItem> targets) {
return new GetKickTargetsResponse(groupId, targets, LocalDateTime.now());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,31 @@
import team.wego.wegobackend.group.v2.domain.entity.GroupV2JoinPolicy;
import team.wego.wegobackend.group.v2.domain.entity.GroupV2Status;

public record ApproveRejectGroupV2Response(
public record GroupUserV2StatusResponse(
Long groupId,
GroupV2Status groupStatus,
GroupV2JoinPolicy joinPolicy,
long participantCount,
int maxParticipants,

TargetMembership targetMembership,

LocalDateTime serverTime
) {

public static ApproveRejectGroupV2Response of(
public static GroupUserV2StatusResponse of(
GroupV2 group,
long participantCount,
Long targetUserId,
GroupUserV2 target
) {
return new ApproveRejectGroupV2Response(
return new GroupUserV2StatusResponse(
group.getId(),
group.getStatus(),
group.getJoinPolicy(),
participantCount,
group.getMaxParticipants(),
TargetMembership.of(targetUserId, target),
TargetMembership.from(targetUserId, target),
LocalDateTime.now()
);
}
}
}

Loading