🔥
This commit is contained in:
@@ -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))
|
||||
}
|
||||
@@ -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))
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user