-
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 #85 from Team-KeepGoing/feature/report
Fix :: 반환값 수정
- Loading branch information
Showing
24 changed files
with
167 additions
and
161 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
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
37 changes: 15 additions & 22 deletions
37
src/main/java/com/keepgoing/keepserver/domain/student/domain/repository/dto/StudentDto.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,36 +1,29 @@ | ||
package com.keepgoing.keepserver.domain.student.domain.repository.dto; | ||
|
||
|
||
import com.keepgoing.keepserver.domain.student.domain.entity.Student; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
@Getter | ||
@Setter | ||
@ToString | ||
public class StudentDto { | ||
private String studentName; | ||
private int grade; | ||
private int group; | ||
private int groupNum; | ||
private String phoneNum; | ||
private String address; | ||
private String mail; | ||
|
||
public record StudentDto( | ||
String studentName, | ||
int grade, | ||
int group, | ||
int groupNum, | ||
String phoneNum, | ||
String address, | ||
String mail | ||
) { | ||
public String format() { | ||
final String FORMAT_PATTERN = "%d%d%02d"; | ||
return String.format(FORMAT_PATTERN, this.grade, this.group, this.groupNum); | ||
} | ||
|
||
public Student toEntity() { | ||
return Student.builder() | ||
.studentName(this.studentName) | ||
.studentId(format()) | ||
.phoneNum(this.phoneNum) | ||
.address(this.address) | ||
.mail(this.mail) | ||
.build(); | ||
.studentName(this.studentName) | ||
.studentId(format()) | ||
.phoneNum(this.phoneNum) | ||
.address(this.address) | ||
.mail(this.mail) | ||
.build(); | ||
} | ||
|
||
} |
12 changes: 4 additions & 8 deletions
12
...in/java/com/keepgoing/keepserver/domain/student/domain/repository/dto/StudentFindDto.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,11 +1,7 @@ | ||
package com.keepgoing.keepserver.domain.student.domain.repository.dto; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
public class StudentFindDto { | ||
String studentName; | ||
String studentId; | ||
public record StudentFindDto( | ||
String studentName, | ||
String studentId | ||
) { | ||
} |
10 changes: 0 additions & 10 deletions
10
...main/java/com/keepgoing/keepserver/domain/student/domain/repository/dto/StudentIdDto.java
This file was deleted.
Oops, something went wrong.
20 changes: 8 additions & 12 deletions
20
...java/com/keepgoing/keepserver/domain/student/domain/repository/dto/StudentRequestDto.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,15 +1,11 @@ | ||
package com.keepgoing.keepserver.domain.student.domain.repository.dto; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
public class StudentRequestDto { | ||
private String studentName; | ||
private String studentId; | ||
private String phoneNum; | ||
private String imgUrl; | ||
private String address; | ||
private String mail; | ||
public record StudentRequestDto( | ||
String studentName, | ||
String studentId, | ||
String phoneNum, | ||
String imgUrl, | ||
String address, | ||
String mail | ||
) { | ||
} |
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
Oops, something went wrong.