Implements Hunt basic create and get, and adds field validation to controllers
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package net.halfbinary.scavengerhuntapi.model.request
|
||||
|
||||
import jakarta.validation.constraints.Future
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import java.time.LocalDateTime
|
||||
|
||||
data class HuntCreateRequest(
|
||||
@field:NotBlank(message = "Hunt title is required")
|
||||
val title: String,
|
||||
@field:Future
|
||||
val startDateTime: LocalDateTime,
|
||||
@field:Future
|
||||
val endDateTime: LocalDateTime,
|
||||
)
|
||||
Reference in New Issue
Block a user