Skip to content

Commit

Permalink
[feat] 장소 응답 좌표 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
doyeoo committed Nov 26, 2023
1 parent a83abac commit 4426160
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@ public class SimplePlaceVo {
private String tel;
private String openingTime;
private String closingTime;
private String xCoordinate;
private String yCoordinate;

@Builder
private SimplePlaceVo(Long id, String name, String image, String address, String tel, String openingTime, String closingTime) {
private SimplePlaceVo(Long id, String name, String image, String address, String tel, String openingTime, String closingTime, String xCoordinate, String yCoordinate) {
this.id = id;
this.name = name;
this.image = image;
this.address = address;
this.tel = tel;
this.openingTime = openingTime;
this.closingTime = closingTime;
this.xCoordinate = xCoordinate;
this.yCoordinate = yCoordinate;
}

public static SimplePlaceVo from(Place place) {
Expand All @@ -37,6 +41,8 @@ public static SimplePlaceVo from(Place place) {
.tel(place.getTel())
.openingTime(place.getOpeningTime())
.closingTime(place.getClosingTime())
.xCoordinate(place.getXCoordinate())
.yCoordinate(place.getYCoordinate())
.build();
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
package sungdong29.backend.domain.user.dto.response;


import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public class TokenResponseDTO {
private Long id;
private String token;

@Builder
private TokenResponseDTO(Long id, String token) {
this.id=id;
this.token=token;
}

public static TokenResponseDTO of(Long id, String token) {
return new TokenResponseDTO(id, token);
return TokenResponseDTO.builder()
.id(id)
.token(token)
.build();
}
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
package sungdong29.backend.domain.user.dto.response;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import sungdong29.backend.domain.user.domain.User;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public class UserResponseDTO {
private Long id;
private String username;
private String nickname;

@Builder
private UserResponseDTO(Long id, String username, String nickname) {
this.id=id;
this.username=username;
this.nickname=nickname;
}

public static UserResponseDTO from(User user) {
return new UserResponseDTO(
user.getId(),
user.getUsername(),
user.getNickname()
);
return UserResponseDTO.builder()
.id(user.getId())
.username(user.getUsername())
.nickname(user.getNickname())
.build();
}
}

0 comments on commit 4426160

Please sign in to comment.