Skip to content

Instantly share code, notes, and snippets.

@Tonel
Last active March 10, 2021 20:09
Show Gist options
  • Save Tonel/0c273bc5ada6f8c55dc35949ad298a88 to your computer and use it in GitHub Desktop.
Save Tonel/0c273bc5ada6f8c55dc35949ad298a88 to your computer and use it in GitHub Desktop.
DTOs
class AuthorDto {
@JsonProperty("id")
var id: Int? = null
@JsonProperty("name")
var name: String? = null
@JsonProperty("surname")
var surname: String? = null
@JsonProperty("birth")
@JsonFormat(pattern = "MM/dd/yyyy")
var birthDate: Date? = null
@JsonProperty("books")
var books: List<BookDto> = ArrayList()
}
class BookDto {
@JsonProperty("id")
var id: Int? = null
@JsonProperty("title")
var title: String? = null
@JsonProperty("release")
@JsonFormat(pattern = "MM/dd/yyyy")
var releaseDate: Date? = null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment