This commit is contained in:
jini
2023-03-28 03:06:45 +09:00
parent b399db7604
commit 6ed8a0e62a
3 changed files with 0 additions and 22 deletions

View File

@@ -1,17 +0,0 @@
package me.jiniworld.demohx.application.notice.domain
import me.jiniworld.demohx.DateTimeUtils
import java.time.LocalDateTime
data class Notice(
val id: String,
val title: String,
val content: String,
val createdAt: LocalDateTime,
) {
fun mapToNoticeSimple() =
NoticeSimple(id = id, title = title, createdOn = DateTimeUtils.toDateString(createdAt))
fun mapToNoticeDetail() =
NoticeDetail(id = id, title = title, content = content, createdAt = DateTimeUtils.toString(createdAt))
}

View File

@@ -1,7 +1,6 @@
package me.jiniworld.demohx.persistence.notice
import me.jiniworld.demohx.DateTimeUtils
import me.jiniworld.demohx.application.notice.domain.Notice
import me.jiniworld.demohx.application.notice.domain.NoticeDetail
import me.jiniworld.demohx.application.notice.domain.NoticeSimple
import org.springframework.data.annotation.CreatedDate
@@ -25,9 +24,6 @@ internal class NoticeDocument {
@LastModifiedDate
var updatedAt: LocalDateTime? = null
fun mapToNotice() =
Notice(id = id, title = title, content = content, createdAt = createdAt)
fun mapToNoticeSimple() =
NoticeSimple(id = id, title = title, createdOn = DateTimeUtils.toDateString(createdAt))

View File

@@ -1,7 +1,6 @@
package me.jiniworld.demohx.persistence.notice
import me.jiniworld.demohx.DateTimeUtils
import me.jiniworld.demohx.application.notice.domain.Notice
import me.jiniworld.demohx.application.notice.domain.NoticeDetail
import me.jiniworld.demohx.application.notice.domain.NoticeSimple
import org.springframework.data.annotation.CreatedDate