-
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.
PetPolygonProfile Entity 제거, Embedded타입으로 Pet Entity에 삽입
PetPolygonProfile Entity 제거, Embedded타입으로 Pet Entity에 삽입
- Loading branch information
Showing
19 changed files
with
140 additions
and
123 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
38 changes: 18 additions & 20 deletions
38
animory/src/main/java/com/daggle/animory/domain/pet/dto/PetPolygonProfileDto.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,36 +1,34 @@ | ||
package com.daggle.animory.domain.pet.dto; | ||
|
||
import com.daggle.animory.domain.pet.entity.Pet; | ||
import com.daggle.animory.domain.pet.entity.PetPolygonProfile; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record PetPolygonProfileDto( | ||
int intelligence, | ||
int affinity, | ||
int athletic, | ||
int adaptability, | ||
int activeness | ||
int intelligence, | ||
int affinity, | ||
int athletic, | ||
int adaptability, | ||
int activeness | ||
) { | ||
|
||
public PetPolygonProfile toEntity(final Pet pet) { | ||
public PetPolygonProfile toEntity() { | ||
return PetPolygonProfile.builder() | ||
.pet(pet) | ||
.intelligence(intelligence) | ||
.affinity(affinity) | ||
.athletic(athletic) | ||
.adaptability(adaptability) | ||
.activeness(activeness) | ||
.build(); | ||
.intelligence(intelligence) | ||
.affinity(affinity) | ||
.athletic(athletic) | ||
.adaptability(adaptability) | ||
.activeness(activeness) | ||
.build(); | ||
} | ||
|
||
public static PetPolygonProfileDto fromEntity(final PetPolygonProfile petPolygonProfile) { | ||
return PetPolygonProfileDto.builder() | ||
.intelligence(petPolygonProfile.getIntelligence()) | ||
.affinity(petPolygonProfile.getAffinity()) | ||
.athletic(petPolygonProfile.getAthletic()) | ||
.adaptability(petPolygonProfile.getAdaptability()) | ||
.activeness(petPolygonProfile.getActiveness()) | ||
.build(); | ||
.intelligence(petPolygonProfile.getIntelligence()) | ||
.affinity(petPolygonProfile.getAffinity()) | ||
.athletic(petPolygonProfile.getAthletic()) | ||
.adaptability(petPolygonProfile.getAdaptability()) | ||
.activeness(petPolygonProfile.getActiveness()) | ||
.build(); | ||
} | ||
} |
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
10 changes: 0 additions & 10 deletions
10
animory/src/main/java/com/daggle/animory/domain/pet/repository/PetPolygonRepository.java
This file was deleted.
Oops, something went wrong.
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.