Answer the question
In order to leave comments, you need to log in
How to limit the value of a variable in a data class?
Here is my data class:
// Entity of query
@Entity(tableName = TABLE_NAME)
data class HistoryItem(
@PrimaryKey(autoGenerate = true)
val id: Int,
@ColumnInfo(name = SEARCHED_DOMAIN)
val searchedDomain: String,
@ColumnInfo(name = STATUS)
val status: Int,
)
object Statuses {
const val FAILURE = 0
const val NOT_FOUND = 1
const val FOUND = 2
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question