File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
src/main/java/com/somemore/volunteer/dto/response Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .somemore .volunteer .dto .response ;
2+
3+ import com .fasterxml .jackson .databind .PropertyNamingStrategies ;
4+ import com .fasterxml .jackson .databind .annotation .JsonNaming ;
5+ import com .somemore .community .dto .response .WriterDetailDto ;
6+ import com .somemore .volunteer .domain .Tier ;
7+ import com .somemore .volunteer .domain .Volunteer ;
8+
9+ import java .util .UUID ;
10+
11+ @ JsonNaming (PropertyNamingStrategies .SnakeCaseStrategy .class )
12+ public record VolunteerForCommunityResponseDto (
13+ UUID id ,
14+ String name ,
15+ String imgUrl ,
16+ Tier tier
17+ ) implements WriterDetailDto {
18+
19+ public static VolunteerForCommunityResponseDto fromEntity (Volunteer volunteer ) {
20+ return new VolunteerForCommunityResponseDto (
21+ volunteer .getId (),
22+ volunteer .getNickname (),
23+ volunteer .getImgUrl (),
24+ volunteer .getTier ()
25+ );
26+ }
27+ }
28+
You can’t perform that action at this time.
0 commit comments