Skip to content

Commit 59ae6cc

Browse files
committed
feat(center): 커뮤니티 조회에 사용할 ResponseDto 생성
1 parent f2e5088 commit 59ae6cc

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.somemore.center.dto.response;
2+
3+
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
4+
import com.fasterxml.jackson.databind.annotation.JsonNaming;
5+
import com.somemore.center.domain.Center;
6+
import com.somemore.community.dto.response.WriterDetailDto;
7+
import com.somemore.volunteer.domain.Tier;
8+
9+
import java.util.UUID;
10+
11+
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
12+
public record CenterForCommunityResponseDto(
13+
UUID id,
14+
String name,
15+
String imgUrl,
16+
Tier tier
17+
) implements WriterDetailDto {
18+
19+
public static CenterForCommunityResponseDto fromEntity(Center center) {
20+
return new CenterForCommunityResponseDto(
21+
center.getId(),
22+
center.getName(),
23+
center.getImgUrl(),
24+
null
25+
);
26+
}
27+
}
28+

0 commit comments

Comments
 (0)