11package grep .neogulcoder .domain .study .controller .dto .response ;
22
33import grep .neogulcoder .domain .study .Study ;
4+ import grep .neogulcoder .domain .study .enums .Category ;
45import grep .neogulcoder .domain .study .enums .StudyType ;
56import io .swagger .v3 .oas .annotations .media .Schema ;
7+ import jakarta .validation .constraints .NotNull ;
68import lombok .Builder ;
79import lombok .Getter ;
810
11+ import java .time .LocalDateTime ;
12+ import java .util .List ;
13+
914@ Getter
1015public class StudyHeaderResponse {
1116
@@ -24,23 +29,49 @@ public class StudyHeaderResponse {
2429 @ Schema (description = "지역" , example = "서울" )
2530 private String location ;
2631
32+ @ Schema (description = "카테고리" , example = "IT" )
33+ private Category category ;
34+
35+ @ Schema (description = "인원수" , example = "6" )
36+ private int capacity ;
37+
38+ @ Schema (description = "시작일" , example = "2025-07-15" )
39+ private LocalDateTime startDate ;
40+
41+ @ NotNull
42+ @ Schema (description = "종료일" , example = "2025-07-28" )
43+ private LocalDateTime endDate ;
44+
45+ @ Schema (description = "스터디 멤버 목록" )
46+ private List <StudyMemberResponse > members ;
47+
2748 @ Builder
28- private StudyHeaderResponse (String name , String introduction , String imageUrl ,
29- StudyType studyType , String location ) {
49+ private StudyHeaderResponse (String name , String introduction , String imageUrl , StudyType studyType , String location , Category category ,
50+ int capacity , LocalDateTime startDate , LocalDateTime endDate , List < StudyMemberResponse > members ) {
3051 this .name = name ;
3152 this .introduction = introduction ;
3253 this .imageUrl = imageUrl ;
3354 this .studyType = studyType ;
3455 this .location = location ;
56+ this .category = category ;
57+ this .capacity = capacity ;
58+ this .startDate = startDate ;
59+ this .endDate = endDate ;
60+ this .members = members ;
3561 }
3662
37- public static StudyHeaderResponse from (Study study ) {
63+ public static StudyHeaderResponse from (Study study , List < StudyMemberResponse > members ) {
3864 return StudyHeaderResponse .builder ()
3965 .name (study .getName ())
4066 .introduction (study .getIntroduction ())
4167 .imageUrl (study .getImageUrl ())
4268 .studyType (study .getStudyType ())
4369 .location (study .getLocation ())
70+ .category (study .getCategory ())
71+ .capacity (study .getCapacity ())
72+ .startDate (study .getStartDate ())
73+ .endDate (study .getEndDate ())
74+ .members (members )
4475 .build ();
4576 }
4677}
0 commit comments