Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Immutable model class for a Github repo that holds all the information about a repository.
- * Objects of this type are received from the Github API, therefore all the fields are annotated
- * with the serialized name.
- * This class also defines the Room repos table, where the repo [id] is the primary key.
- */
- @Entity(tableName = "repos")
- data class Repo(
- @PrimaryKey @field:SerializedName("id") val id: Long,
- @field:SerializedName("name") val name: String,
- @field:SerializedName("full_name") val fullName: String,
- @field:SerializedName("description") val description: String?,
- @field:SerializedName("html_url") val url: String,
- @field:SerializedName("stargazers_count") val stars: Int,
- @field:SerializedName("forks_count") val forks: Int,
- @field:SerializedName("language") val language: String?
- )
Add Comment
Please, Sign In to add comment