-
Notifications
You must be signed in to change notification settings - Fork 3
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 #434 from woowacourse-teams/develop
Release: v1.2.0
- Loading branch information
Showing
168 changed files
with
3,065 additions
and
747 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
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
34 changes: 34 additions & 0 deletions
34
backend/src/main/java/zipgo/admin/dto/PetFoodReadResponse.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,34 @@ | ||
package zipgo.admin.dto; | ||
|
||
import java.util.List; | ||
import zipgo.petfood.domain.PetFood; | ||
|
||
public record PetFoodReadResponse( | ||
Long id, | ||
String brandName, | ||
String foodName, | ||
String imageUrl, | ||
boolean euStandard, | ||
boolean usStandard, | ||
List<String> functionalities, | ||
List<String> primaryIngredients | ||
) { | ||
|
||
public static PetFoodReadResponse from(PetFood petFood) { | ||
return new PetFoodReadResponse( | ||
petFood.getId(), | ||
petFood.getBrand().getName(), | ||
petFood.getName(), | ||
petFood.getImageUrl(), | ||
petFood.getHasStandard().getEurope(), | ||
petFood.getHasStandard().getUnitedStates(), | ||
petFood.getPetFoodFunctionalities().stream() | ||
.map(petFoodFunctionality -> petFoodFunctionality.getFunctionality().getName()) | ||
.toList(), | ||
petFood.getPetFoodPrimaryIngredients().stream() | ||
.map(petFoodPrimaryIngredient -> petFoodPrimaryIngredient.getPrimaryIngredient().getName()) | ||
.toList() | ||
); | ||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
backend/src/main/java/zipgo/admin/dto/PetFoodUpdateRequest.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,20 @@ | ||
package zipgo.admin.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.PropertyNamingStrategies; | ||
import com.fasterxml.jackson.databind.annotation.JsonNaming; | ||
import java.util.List; | ||
|
||
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) | ||
public record PetFoodUpdateRequest ( | ||
String petFoodName, | ||
String brandName, | ||
boolean euStandard, | ||
boolean usStandard, | ||
String imageUrl, | ||
List<String> functionalities, | ||
List<String> primaryIngredients | ||
) { | ||
|
||
} | ||
|
Oops, something went wrong.