From ccac293c70c02f93d58974f9fe0cbbd96c3aa679 Mon Sep 17 00:00:00 2001 From: TwooTwoo Date: Wed, 11 Feb 2026 01:00:05 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=A9=98=ED=86=A0=20=ED=95=A0=20?= =?UTF-8?q?=EC=9D=BC=20=EC=88=98=EC=A0=95=20=EC=8B=9C=20=EB=82=A0=EC=A7=9C?= =?UTF-8?q?(date)=20=EB=B3=80=EA=B2=BD=EC=9D=B4=20=EB=B0=98=EC=98=81?= =?UTF-8?q?=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EB=B2=84=EA=B7=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Task 엔티티의 date 필드를 val에서 var로 변경하여 수정 가능하도록 함 - MentorTaskUpdateRequest에 date 필드 추가 - MentorTaskService.updateTask()에 date 업데이트 로직 추가 --- .../kotlin/goodspace/bllsoneshot/entity/assignment/Task.kt | 2 +- .../bllsoneshot/mentor/dto/request/MentorTaskUpdateRequest.kt | 3 +++ .../goodspace/bllsoneshot/mentor/service/MentorTaskService.kt | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/goodspace/bllsoneshot/entity/assignment/Task.kt b/src/main/kotlin/goodspace/bllsoneshot/entity/assignment/Task.kt index 18aa47c..66cb677 100644 --- a/src/main/kotlin/goodspace/bllsoneshot/entity/assignment/Task.kt +++ b/src/main/kotlin/goodspace/bllsoneshot/entity/assignment/Task.kt @@ -18,7 +18,7 @@ class Task( @Column(nullable = false) var subject: Subject, - val date: LocalDate? = null, + var date: LocalDate? = null, @Column(nullable = false) var name: String, diff --git a/src/main/kotlin/goodspace/bllsoneshot/mentor/dto/request/MentorTaskUpdateRequest.kt b/src/main/kotlin/goodspace/bllsoneshot/mentor/dto/request/MentorTaskUpdateRequest.kt index 78eac31..f4efdc2 100644 --- a/src/main/kotlin/goodspace/bllsoneshot/mentor/dto/request/MentorTaskUpdateRequest.kt +++ b/src/main/kotlin/goodspace/bllsoneshot/mentor/dto/request/MentorTaskUpdateRequest.kt @@ -6,10 +6,13 @@ import goodspace.bllsoneshot.task.dto.request.WorksheetCreateRequest import jakarta.validation.constraints.NotBlank import jakarta.validation.constraints.PositiveOrZero import jakarta.validation.constraints.Size +import java.time.LocalDate data class MentorTaskUpdateRequest( val subject: Subject, + val date: LocalDate?, + @field:NotBlank(message = "할 일 이름이 비어 있습니다.") @field:Size(max = 50, message = "할 일 이름은 50자를 초과할 수 없습니다.") val taskName: String, diff --git a/src/main/kotlin/goodspace/bllsoneshot/mentor/service/MentorTaskService.kt b/src/main/kotlin/goodspace/bllsoneshot/mentor/service/MentorTaskService.kt index 661e268..c0091f5 100644 --- a/src/main/kotlin/goodspace/bllsoneshot/mentor/service/MentorTaskService.kt +++ b/src/main/kotlin/goodspace/bllsoneshot/mentor/service/MentorTaskService.kt @@ -99,6 +99,7 @@ class MentorTaskService( validateMentorAccess(mentorId, task) task.subject = request.subject + task.date = request.date task.name = request.taskName task.goalMinutes = request.goalMinutes replaceWorksheets(task, request)