-
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.
feat: StudentRequestDTO & StudentService refactor
- Loading branch information
1 parent
2d7cd23
commit d81235a
Showing
4 changed files
with
63 additions
and
74 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/main/java/com/electric_diary/DTO/Request/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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.electric_diary.DTO.Request; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class StudentRequestDTO { | ||
private String firstName; | ||
private String lastName; | ||
private Integer classId; | ||
private Integer parentId; | ||
private Integer userId; | ||
} |
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
10 changes: 5 additions & 5 deletions
10
src/main/java/com/electric_diary/services/StudentService.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,16 +1,16 @@ | ||
package com.electric_diary.services; | ||
|
||
import com.electric_diary.DTO.StudentDTO; | ||
import com.electric_diary.DTO.Request.StudentRequestDTO; | ||
import com.electric_diary.entities.StudentEntity; | ||
|
||
public interface StudentService { | ||
public StudentEntity createStudent(StudentDTO studentDTOBody); | ||
public StudentEntity createStudent(StudentRequestDTO studentRequestDTO); | ||
|
||
public Iterable<StudentEntity> getAllStudents(); | ||
|
||
public StudentEntity getStudentById(String id); | ||
public StudentEntity getStudentById(Integer studentId); | ||
|
||
public StudentEntity updateStudent(String id, StudentDTO studentDTOBody); | ||
public StudentEntity updateStudent(Integer studentId, StudentRequestDTO studentRequestDTO); | ||
|
||
public StudentEntity deleteStudent(String id); | ||
public StudentEntity deleteStudent(Integer studentId); | ||
} |
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