-
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.
REFACTOR(project) :: member Dto들 record로 변경
- Loading branch information
1 parent
779a36a
commit 9011d10
Showing
4 changed files
with
16 additions
and
35 deletions.
There are no files selected for viewing
13 changes: 3 additions & 10 deletions
13
...main/java/com/woongeya/zoing/domain/project/presetation/dto/request/MemberRequestDto.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,13 +1,6 @@ | ||
package com.woongeya.zoing.domain.project.presetation.dto.request; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class MemberRequestDto { | ||
|
||
private Long memberId; | ||
public record MemberRequestDto ( | ||
Long memberId | ||
) { | ||
} |
24 changes: 7 additions & 17 deletions
24
...in/java/com/woongeya/zoing/domain/project/presetation/dto/response/MemberResponseDto.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,23 +1,13 @@ | ||
package com.woongeya.zoing.domain.project.presetation.dto.response; | ||
|
||
import com.woongeya.zoing.domain.project.domain.Member; | ||
import com.woongeya.zoing.domain.user.domain.User; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@Builder | ||
public class MemberResponseDto { | ||
|
||
private Long userId; | ||
private String name; | ||
private String imgUrl; | ||
|
||
public static MemberResponseDto of(User user) { | ||
return MemberResponseDto.builder() | ||
.userId(user.getId()) | ||
.name(user.getName()) | ||
.imgUrl(user.getImgUrl()) | ||
.build(); | ||
public record MemberResponseDto ( | ||
Long userId, | ||
String name, | ||
String imgUrl | ||
){ | ||
public static MemberResponseDto from(User user) { | ||
return new MemberResponseDto(user.getId(), user.getName(), user.getImgUrl()); | ||
} | ||
} |
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