feat(notice): 예약 관리와 공개 시점 기반 조회를 구현한다
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
package kr.co.vividnext.sodalive.notice
|
||||
|
||||
import java.time.LocalDateTime
|
||||
|
||||
data class CreateNoticeRequest(
|
||||
val title: String,
|
||||
val content: String
|
||||
val content: String,
|
||||
val publishAt: String? = null
|
||||
) {
|
||||
fun toEntity(): ServiceNotice {
|
||||
return ServiceNotice(title, content)
|
||||
fun toEntity(publishAt: LocalDateTime? = null): ServiceNotice {
|
||||
return ServiceNotice(title, content, publishAt = publishAt, isScheduled = publishAt != null)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user