Guest User

Untitled

a guest
Dec 11th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. /**
  2. * Immutable model class for a Github repo that holds all the information about a repository.
  3. * Objects of this type are received from the Github API, therefore all the fields are annotated
  4. * with the serialized name.
  5. * This class also defines the Room repos table, where the repo [id] is the primary key.
  6. */
  7. @Entity(tableName = "repos")
  8. data class Repo(
  9. @PrimaryKey @field:SerializedName("id") val id: Long,
  10. @field:SerializedName("name") val name: String,
  11. @field:SerializedName("full_name") val fullName: String,
  12. @field:SerializedName("description") val description: String?,
  13. @field:SerializedName("html_url") val url: String,
  14. @field:SerializedName("stargazers_count") val stars: Int,
  15. @field:SerializedName("forks_count") val forks: Int,
  16. @field:SerializedName("language") val language: String?
  17. )
Add Comment
Please, Sign In to add comment