Files
sodalive-backend-spring-boot/src/main/kotlin/kr/co/vividnext/sodalive/notice/CreateNoticeRequest.kt
T

14 lines
368 B
Kotlin

package kr.co.vividnext.sodalive.notice
import java.time.LocalDateTime
data class CreateNoticeRequest(
val title: String,
val content: String,
val publishAt: String? = null
) {
fun toEntity(publishAt: LocalDateTime? = null): ServiceNotice {
return ServiceNotice(title, content, publishAt = publishAt, isScheduled = publishAt != null)
}
}