-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from JNU-econovation/feat/48/ouath
feat: filter 조회 기능 개발
- Loading branch information
Showing
4 changed files
with
62 additions
and
30 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...ain/java/com/example/demo/filter/application/model/converter/FilterResponseConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,34 @@ | ||
package com.example.demo.filter.application.model.converter; | ||
|
||
import com.example.demo.filter.application.dto.AllFilterResponse; | ||
import com.example.demo.filter.application.dto.CreateFilterResponse; | ||
import com.example.demo.filter.application.model.FilterModel; | ||
import com.example.demo.schedule.application.dto.AllCalendarResponse; | ||
import com.example.demo.schedule.application.model.ScheduleModel; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Component | ||
public class FilterResponseConverter { | ||
|
||
public CreateFilterResponse from(Long filterId) { | ||
return CreateFilterResponse.builder().filterId(filterId).build(); | ||
} | ||
|
||
public List<AllFilterResponse> toAllModel(List<FilterModel> models) { | ||
List<AllFilterResponse> response = new ArrayList<>(); | ||
for (FilterModel model : models) { | ||
AllFilterResponse filter = AllFilterResponse.builder() | ||
.filterId(model.getFilterId()) | ||
.filterName(model.getFilterName()) | ||
.filterColor(model.getFilterColor()) | ||
.build(); | ||
response.add(filter); | ||
} | ||
return response; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters