From 3aeec5927d4bdaff7906a2fa30859d7b30d061a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EA=B0=80=EC=98=81?= Date: Tue, 25 Jun 2024 09:04:58 +0900 Subject: [PATCH] fix: null point exception --- .../dgsw/clock_server/domain/routine/entity/RoutineEntity.java | 2 ++ .../clock_server/domain/routine/service/RoutineServiceImpl.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/main/java/kr/hs/dgsw/clock_server/domain/routine/entity/RoutineEntity.java b/src/main/java/kr/hs/dgsw/clock_server/domain/routine/entity/RoutineEntity.java index 4cd0463..6287195 100644 --- a/src/main/java/kr/hs/dgsw/clock_server/domain/routine/entity/RoutineEntity.java +++ b/src/main/java/kr/hs/dgsw/clock_server/domain/routine/entity/RoutineEntity.java @@ -44,9 +44,11 @@ public class RoutineEntity extends BaseTimeEntity { private State state; @NotNull + @Column(name = "start_at") private LocalDate startAt; @NotNull + @Column(name = "end_at") private LocalDate endAt; public void updateRoutine(String name, ImportanceEnum importanceEnum, ColorEnum colorEnum, LocalDate startAt, LocalDate endAt){ diff --git a/src/main/java/kr/hs/dgsw/clock_server/domain/routine/service/RoutineServiceImpl.java b/src/main/java/kr/hs/dgsw/clock_server/domain/routine/service/RoutineServiceImpl.java index 2fa182f..2c9326b 100644 --- a/src/main/java/kr/hs/dgsw/clock_server/domain/routine/service/RoutineServiceImpl.java +++ b/src/main/java/kr/hs/dgsw/clock_server/domain/routine/service/RoutineServiceImpl.java @@ -26,6 +26,8 @@ public void generate(RoutineGenerateReq req){ .importanceEnum(req.getImportanceEnum()) .colorEnum(req.getColorEnum()) .state(State.active) + .startAt(req.getStartAt()) + .endAt(req.getEndAt()) .build()); }