-
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: RoleRequestDTO & RoleService refactor
- Loading branch information
1 parent
44c64d9
commit 2d7cd23
Showing
4 changed files
with
36 additions
and
52 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/main/java/com/electric_diary/DTO/Request/RoleRequestDTO.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,12 @@ | ||
package com.electric_diary.DTO.Request; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class RoleRequestDTO { | ||
private String name; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
package com.electric_diary.services; | ||
|
||
import com.electric_diary.DTO.Request.RoleRequestDTO; | ||
import com.electric_diary.entities.RoleEntity; | ||
|
||
public interface RoleService { | ||
public RoleEntity createRole(RoleEntity roleBody); | ||
public RoleEntity createRole(RoleRequestDTO roleRequestDTO); | ||
|
||
public Iterable<RoleEntity> getAllRoles(); | ||
|
||
public RoleEntity getRoleById(String id); | ||
public RoleEntity getRoleById(Integer roleId); | ||
|
||
public RoleEntity updateRole(String id, RoleEntity roleBody); | ||
public RoleEntity updateRole(Integer roleId, RoleRequestDTO roleRequestDTO); | ||
|
||
public RoleEntity deleteRole(String id); | ||
public RoleEntity deleteRole(Integer roleId); | ||
} |
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