12 lines
426 B
Kotlin
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)
|
|
}
|
|
}
|