[#44] 매장 기능 도입 #45

Merged
pricelees merged 116 commits from feat/#44 into main 2025-09-20 03:15:06 +00:00
Showing only changes of commit 6cfa2cbd38 - Show all commits

View File

@ -45,12 +45,29 @@ class ScheduleEntity(
) {
time?.let { this.time = it }
status?.let { this.status = it }
MdcPrincipalId.extractAsLongOrNull()?.also { this.updatedBy = it }
updateLastModifiedBy()
}
fun hold() {
this.status = ScheduleStatus.HOLD
}
fun updateLastModifiedBy() {
MdcPrincipalId.extractAsLongOrNull()?.also { this.updatedBy = it }
}
}
object ScheduleEntityFactory {
fun create(id: Long, date: LocalDate, time: LocalTime, storeId: Long, themeId: Long): ScheduleEntity {
return ScheduleEntity(
id = id,
date = date,
time = time,
storeId = storeId,
themeId = themeId,
status = ScheduleStatus.AVAILABLE
).apply { this.updateLastModifiedBy() }
}
}
enum class ScheduleStatus {