Skip to content

Instantly share code, notes, and snippets.

@juancho088
Created June 11, 2018 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juancho088/0a93a1b047c62e282d27e73d4468be91 to your computer and use it in GitHub Desktop.
Save juancho088/0a93a1b047c62e282d27e73d4468be91 to your computer and use it in GitHub Desktop.
Models for the Movie microservice
// File models.kt in the movies package (microservice)
package com.myblockbuster.movies
import com.myblockbuster.core.BaseModel
data class Person(var name: String, var surname: String) {
constructor() : this("", "")
}
data class Movie(var title: String, var rate: Double, var language: String, var director: Person,
var cast: List<Person>, var code: String, override var id: Int?): BaseModel() {
constructor(): this("", 0.0, "EN", Person(), listOf(Person()), "", -1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment