-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into KL-183/로그아웃-구현
- Loading branch information
Showing
90 changed files
with
512 additions
and
441 deletions.
There are no files selected for viewing
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
24 changes: 24 additions & 0 deletions
24
src/main/java/taco/klkl/domain/category/dto/response/category/CategoryDetailResponse.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,24 @@ | ||
package taco.klkl.domain.category.dto.response.category; | ||
|
||
import java.util.List; | ||
|
||
import taco.klkl.domain.category.domain.category.Category; | ||
import taco.klkl.domain.category.dto.response.subcategory.SubcategoryDetailResponse; | ||
|
||
public record CategoryDetailResponse( | ||
Long id, | ||
String name, | ||
List<SubcategoryDetailResponse> subcategories | ||
) { | ||
public static CategoryDetailResponse from(final Category category) { | ||
List<SubcategoryDetailResponse> subcategories = category.getSubcategories().stream() | ||
.map(SubcategoryDetailResponse::from) | ||
.toList(); | ||
|
||
return new CategoryDetailResponse( | ||
category.getId(), | ||
category.getName(), | ||
subcategories | ||
); | ||
} | ||
} |
24 changes: 0 additions & 24 deletions
24
src/main/java/taco/klkl/domain/category/dto/response/category/CategoryResponse.java
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
src/main/java/taco/klkl/domain/category/dto/response/category/CategorySimpleResponse.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,15 @@ | ||
package taco.klkl.domain.category.dto.response.category; | ||
|
||
import taco.klkl.domain.category.domain.category.Category; | ||
|
||
public record CategorySimpleResponse( | ||
Long id, | ||
String name | ||
) { | ||
public static CategorySimpleResponse from(final Category category) { | ||
return new CategorySimpleResponse( | ||
category.getId(), | ||
category.getName() | ||
); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...in/java/taco/klkl/domain/category/dto/response/subcategory/SubcategoryDetailResponse.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,26 @@ | ||
package taco.klkl.domain.category.dto.response.subcategory; | ||
|
||
import java.util.List; | ||
|
||
import taco.klkl.domain.category.domain.SubcategoryTag; | ||
import taco.klkl.domain.category.domain.subcategory.Subcategory; | ||
import taco.klkl.domain.category.dto.response.tag.TagSimpleResponse; | ||
|
||
public record SubcategoryDetailResponse( | ||
Long id, | ||
String name, | ||
List<TagSimpleResponse> tags | ||
) { | ||
public static SubcategoryDetailResponse from(final Subcategory subcategory) { | ||
final List<TagSimpleResponse> tags = subcategory.getSubcategoryTags().stream() | ||
.map(SubcategoryTag::getTag) | ||
.map(TagSimpleResponse::from) | ||
.toList(); | ||
|
||
return new SubcategoryDetailResponse( | ||
subcategory.getId(), | ||
subcategory.getName(), | ||
tags | ||
); | ||
} | ||
} |
26 changes: 0 additions & 26 deletions
26
src/main/java/taco/klkl/domain/category/dto/response/subcategory/SubcategoryResponse.java
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
...in/java/taco/klkl/domain/category/dto/response/subcategory/SubcategorySimpleResponse.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,15 @@ | ||
package taco.klkl.domain.category.dto.response.subcategory; | ||
|
||
import taco.klkl.domain.category.domain.subcategory.Subcategory; | ||
|
||
public record SubcategorySimpleResponse( | ||
Long id, | ||
String name | ||
) { | ||
public static SubcategorySimpleResponse from(final Subcategory subcategory) { | ||
return new SubcategorySimpleResponse( | ||
subcategory.getId(), | ||
subcategory.getName() | ||
); | ||
} | ||
} |
12 changes: 0 additions & 12 deletions
12
src/main/java/taco/klkl/domain/category/dto/response/tag/TagResponse.java
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
src/main/java/taco/klkl/domain/category/dto/response/tag/TagSimpleResponse.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,12 @@ | ||
package taco.klkl.domain.category.dto.response.tag; | ||
|
||
import taco.klkl.domain.category.domain.tag.Tag; | ||
|
||
public record TagSimpleResponse( | ||
Long id, | ||
String name | ||
) { | ||
public static TagSimpleResponse from(final Tag tag) { | ||
return new TagSimpleResponse(tag.getId(), tag.getName()); | ||
} | ||
} |
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
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
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
Oops, something went wrong.