-
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 pull request #34 from KUSITMS-Team-A/fix/33-find-store
[#33] 가게 찾기 조회 스펙 변경
- Loading branch information
Showing
4 changed files
with
56 additions
and
10 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
32 changes: 32 additions & 0 deletions
32
src/main/java/com/backend/domain/user/dto/RepresentativeDto.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,32 @@ | ||
package com.backend.domain.user.dto; | ||
|
||
import com.backend.domain.user.entity.User; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class RepresentativeDto { | ||
|
||
private Long id; | ||
|
||
private String name; | ||
|
||
private Double latitude; | ||
|
||
private Double longitude; | ||
|
||
public static RepresentativeDto from(User user) { | ||
return RepresentativeDto.builder() | ||
.id(user.getId()) | ||
.name(user.getTypeName()) | ||
.latitude(user.getUniversity().getLatitude()) | ||
.longitude(user.getUniversity().getLongitude()) | ||
.build(); | ||
} | ||
|
||
} |