Skip to content

Commit

Permalink
mod: OreumResponse 오름 유형 enum 타입으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Song-EunJu committed Nov 17, 2022
1 parent 3e84068 commit 6abde55
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/com/example/goorm/oreum/dto/OreumResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.example.goorm.oreum.domain.MyOreum;
import com.example.goorm.oreum.domain.Oreum;
import com.example.goorm.oreum.domain.OreumType;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
Expand All @@ -12,7 +13,7 @@
public class OreumResponse {
private String nickname;
private String name;
private String type;
private OreumType type;
private double xPos;
private double yPos;
private double zPos;
Expand All @@ -24,7 +25,7 @@ public static OreumResponse of(Oreum oreum, MyOreum myOreum, BirthdayRequest req
return OreumResponse.builder()
.nickname(request.getNickname())
.name(oreum.getName())
.type(oreum.getOreumType().getTitle())
.type(oreum.getOreumType())
.xPos(oreum.getXPos())
.yPos(oreum.getYPos())
.zPos(oreum.getZPos())
Expand All @@ -38,7 +39,7 @@ public static OreumResponse ofOthers(Oreum oreum, MyOreum myOreum){
return OreumResponse.builder()
.nickname(myOreum.getNickname())
.name(oreum.getName())
.type(oreum.getOreumType().getTitle())
.type(oreum.getOreumType())
.xPos(oreum.getXPos())
.yPos(oreum.getYPos())
.zPos(oreum.getZPos())
Expand Down

0 comments on commit 6abde55

Please sign in to comment.