Files
tmnt-api/src/main/kotlin/net/halfbinary/tmnt/dto/MovieRequest.kt
2025-02-19 09:24:59 -06:00

12 lines
426 B
Kotlin

package net.halfbinary.tmnt.dto
import net.halfbinary.tmnt.model.Movie
import java.time.LocalDateTime
import java.util.*
data class MovieRequest(val title: String, val screenedDate: LocalDateTime, val releaseYear: Int, val imdbLink: String, val notes: String) {
fun toModel(): Movie {
return Movie(UUID.randomUUID(), this.title, this.screenedDate, this.releaseYear, this.imdbLink, this.notes)
}
}