Skip to content

Commit

Permalink
Merge pull request #16 from Sam3Star/gayeong
Browse files Browse the repository at this point in the history
Gayeong
  • Loading branch information
GayeongKimm authored Jun 25, 2024
2 parents d78f5e4 + 0c96366 commit 62a558b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@

import kr.hs.dgsw.clock_server.global.common.enums.ColorEnum;
import kr.hs.dgsw.clock_server.global.common.enums.ImportanceEnum;
import kr.hs.dgsw.clock_server.global.common.enums.State;

public record RoutineLoadRes(
Long id,
String name,
ImportanceEnum importanceEnum,
ColorEnum colorEnum
ColorEnum colorEnum,
State state
) {
public static RoutineLoadRes of(Long id,
String name,
ImportanceEnum importanceEnum,
ColorEnum colorEnum){
return new RoutineLoadRes(id, name, importanceEnum, colorEnum);
ColorEnum colorEnum,
State state){
return new RoutineLoadRes(id, name, importanceEnum, colorEnum, state);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ public List<RoutineLoadRes> loadRoutine() {

List<RoutineLoadRes> routineLoadResList = new ArrayList<>();
for (RoutineEntity routine : routineEntity){
routineLoadResList.add(RoutineLoadRes.of(routine.getRoutineId(),
routineLoadResList.add(RoutineLoadRes.of(
routine.getRoutineId(),
routine.getName(),
routine.getImportanceEnum(),
routine.getColorEnum()));
routine.getColorEnum(),
routine.getState())
);
}
return routineLoadResList;
}
Expand Down

0 comments on commit 62a558b

Please sign in to comment.