diff --git a/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/dto/TagRequest.kt b/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/dto/TagRequest.kt index 209aeeb..cfc29d5 100644 --- a/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/dto/TagRequest.kt +++ b/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/dto/TagRequest.kt @@ -17,6 +17,8 @@ sealed class TagRequest { val id: UUID, val name: String, val colorHex: String, - val embeddingVector: List + val embeddingVector: List, + val createdAt: Instant, + val updatedAt: Instant? ) : TagResponse() } diff --git a/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/service/TagService.kt b/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/service/TagService.kt index dc71b94..9877173 100644 --- a/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/service/TagService.kt +++ b/src/main/kotlin/com/wafflestudio/toyproject/memoWithTags/tag/service/TagService.kt @@ -11,7 +11,6 @@ import com.wafflestudio.toyproject.memoWithTags.tag.persistence.TagRepository import com.wafflestudio.toyproject.memoWithTags.user.controller.User import com.wafflestudio.toyproject.memoWithTags.user.persistence.UserRepository import org.springframework.stereotype.Service -import java.time.Instant import java.util.UUID @Service @@ -53,7 +52,7 @@ class TagService( tagEntity.name = request.name tagEntity.colorHex = request.colorHex tagEntity.embeddingVector = Tag.convertEmbeddingVectorToString(request.embeddingVector) - tagEntity.updatedAt = Instant.now() + tagEntity.updatedAt = request.updatedAt val savedTagEntity = tagRepository.save(tagEntity) return Tag( savedTagEntity.id,