-
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.
Browse files
Browse the repository at this point in the history
Feature/#21/mypage
- Loading branch information
Showing
12 changed files
with
97 additions
and
22 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
2 changes: 2 additions & 0 deletions
2
server/src/main/java/com/plantity/server/domain/myPlant/MyPlant.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
2 changes: 2 additions & 0 deletions
2
server/src/main/java/com/plantity/server/domain/users/Users.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
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
23 changes: 23 additions & 0 deletions
23
server/src/main/java/com/plantity/server/domain/users/UsersResponseDto.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,23 @@ | ||
package com.plantity.server.domain.users; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class UsersResponseDto { | ||
|
||
private String nickName; | ||
private String rating; | ||
private int score; | ||
|
||
private UsersResponseDto(Users users) { | ||
this.nickName = users.getNickName(); | ||
this.rating = users.getRating(); | ||
this.score = users.getScore(); | ||
} | ||
|
||
public static UsersResponseDto from(Users users) { | ||
return new UsersResponseDto(users); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
server/src/main/java/com/plantity/server/dto/res/users/UserResponse.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,25 @@ | ||
package com.plantity.server.dto.res.users; | ||
|
||
import com.plantity.server.constants.SuccessCode; | ||
import com.plantity.server.domain.users.UsersResponseDto; | ||
import com.plantity.server.dto.BaseResponse; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.springframework.http.ResponseEntity; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class UserResponse extends BaseResponse { | ||
|
||
private UsersResponseDto data; | ||
|
||
private UserResponse(Boolean success, String msg, UsersResponseDto data) { | ||
super(success, msg); | ||
this.data = data; | ||
} | ||
|
||
public static ResponseEntity<UserResponse> newResponse(SuccessCode code, UsersResponseDto data) { | ||
UserResponse response = new UserResponse(true, code.getMsg(), data); | ||
return new ResponseEntity(response, code.getStatus()); | ||
} | ||
} |
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
3 changes: 0 additions & 3 deletions
3
server/src/main/java/com/plantity/server/service/MyPlantService.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
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