diff --git a/src/main/java/com/scg/stop/project/dto/response/ProjectResponse.java b/src/main/java/com/scg/stop/project/dto/response/ProjectResponse.java index 72f5fdab..a6937e2f 100644 --- a/src/main/java/com/scg/stop/project/dto/response/ProjectResponse.java +++ b/src/main/java/com/scg/stop/project/dto/response/ProjectResponse.java @@ -22,6 +22,7 @@ public class ProjectResponse { private ProjectCategory projectCategory; private AwardStatus awardStatus; private List techStacks; + private Integer year; private Integer likeCount; private Boolean like; private Boolean bookMark; @@ -55,6 +56,7 @@ public static ProjectResponse of(User user, Project project){ project.getCategory(), project.getAwardStatus(), techStackList, + project.getYear(), project.getLikes().size(), like, bookMark diff --git a/src/test/java/com/scg/stop/project/controller/ProjectControllerTest.java b/src/test/java/com/scg/stop/project/controller/ProjectControllerTest.java index aa16aa64..9bf434f1 100644 --- a/src/test/java/com/scg/stop/project/controller/ProjectControllerTest.java +++ b/src/test/java/com/scg/stop/project/controller/ProjectControllerTest.java @@ -85,6 +85,7 @@ void getProjects() throws Exception { ProjectCategory.BIG_DATA_ANALYSIS, AwardStatus.FIRST, List.of("파이썬", "SQL"), + 2023, 100, false, false @@ -105,6 +106,7 @@ void getProjects() throws Exception { ProjectCategory.AI_MACHINE_LEARNING, AwardStatus.SECOND, List.of("파이썬", "OpenCV"), + 2023, 100, false, true @@ -147,6 +149,7 @@ void getProjects() throws Exception { fieldWithPath("content[].projectCategory").type(JsonFieldType.STRING).description("프로젝트 카테고리: COMPUTER_VISION, SYSTEM_NETWORK, WEB_APPLICATION, SECURITY_SOFTWARE_ENGINEERING, NATURAL_LANGUAGE_PROCESSING, BIG_DATA_ANALYSIS, AI_MACHINE_LEARNING, INTERACTION_AUGMENTED_REALITY"), fieldWithPath("content[].awardStatus").type(JsonFieldType.STRING).description("수상 여부: NONE, FIRST, SECOND, THIRD, FOURTH, FIFTH"), fieldWithPath("content[].techStacks").type(JsonFieldType.ARRAY).description("기술 스택"), + fieldWithPath("content[].year").type(JsonFieldType.NUMBER).description("프로젝트 년도"), fieldWithPath("content[].likeCount").type(JsonFieldType.NUMBER).description("좋아요 수"), fieldWithPath("content[].like").type(JsonFieldType.BOOLEAN).description("좋아요 여부"), fieldWithPath("content[].bookMark").type(JsonFieldType.BOOLEAN).description("북마크 여부"), @@ -761,6 +764,7 @@ void getAwardProjects() throws Exception { ProjectCategory.BIG_DATA_ANALYSIS, AwardStatus.FIRST, List.of("파이썬", "SQL"), + 2023, 100, false, false @@ -781,6 +785,7 @@ void getAwardProjects() throws Exception { ProjectCategory.AI_MACHINE_LEARNING, AwardStatus.SECOND, List.of("파이썬", "OpenCV"), + 2023, 100, false, true @@ -821,6 +826,7 @@ void getAwardProjects() throws Exception { fieldWithPath("content[].projectCategory").type(JsonFieldType.STRING).description("프로젝트 카테고리: COMPUTER_VISION, SYSTEM_NETWORK, WEB_APPLICATION, SECURITY_SOFTWARE_ENGINEERING, NATURAL_LANGUAGE_PROCESSING, BIG_DATA_ANALYSIS, AI_MACHINE_LEARNING, INTERACTION_AUGMENTED_REALITY"), fieldWithPath("content[].awardStatus").type(JsonFieldType.STRING).description("수상 여부: NONE, FIRST, SECOND, THIRD, FOURTH, FIFTH"), fieldWithPath("content[].techStacks").type(JsonFieldType.ARRAY).description("기술 스택"), + fieldWithPath("content[].year").type(JsonFieldType.NUMBER).description("프로젝트 년도"), fieldWithPath("content[].likeCount").type(JsonFieldType.NUMBER).description("좋아요 수"), fieldWithPath("content[].like").type(JsonFieldType.BOOLEAN).description("좋아요 여부"), fieldWithPath("content[].bookMark").type(JsonFieldType.BOOLEAN).description("북마크 여부"),