-
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 #146 from JNU-econovation/BE
Be
- Loading branch information
Showing
6 changed files
with
97 additions
and
30 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
BE/error/src/main/java/com/example/demo/filter/application/dto/AllFilterResponse.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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.example.demo.filter.application.dto; | ||
|
||
import com.example.demo.common.support.dto.AbstractDto; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Builder(toBuilder = true) | ||
public class AllFilterResponse implements AbstractDto { | ||
private Long filterId; | ||
private String filterName; | ||
private String filterColor; | ||
} |
24 changes: 24 additions & 0 deletions
24
...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,37 @@ | ||
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
11 changes: 11 additions & 0 deletions
11
BE/error/src/main/java/com/example/demo/filter/application/usecase/GetAllFilterUsecase.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.example.demo.filter.application.usecase; | ||
|
||
import com.example.demo.filter.application.dto.AllFilterResponse; | ||
import com.example.demo.filter.application.dto.CreateFilterRequest; | ||
import com.example.demo.filter.application.dto.CreateFilterResponse; | ||
|
||
import java.util.List; | ||
|
||
public interface GetAllFilterUsecase { | ||
List<AllFilterResponse> getFilter(); | ||
} |
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