Adds code
This commit is contained in:
11
src/main/kotlin/net/halfbinary/tmnt/dto/MovieRequest.kt
Normal file
11
src/main/kotlin/net/halfbinary/tmnt/dto/MovieRequest.kt
Normal file
@@ -0,0 +1,11 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user