-
-
Save zamahaka/23cc8f3f8528ff867b84ecde49ef8241 to your computer and use it in GitHub Desktop.
Fixed User data. Use MutableList instead of List
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity(tableName = UserDao.TABLE_NAME) | |
data class User @JvmOverloads constructor( | |
@PrimaryKey @ColumnInfo(name = COLUMN_ID) var id: Long? = null, | |
@ColumnInfo(name = COLUMN_NAME) var name: String? = null, | |
@ColumnInfo(name = COLUMN_EMAIL) var email: String? = null, | |
@ColumnInfo(name = COLUMN_TYPES) var types: MutableList<UserType?>? = null | |
) | |
enum class UserType { GROWER, LAB, DISPENSARY, PATIENT, DOCTOR, SUPPLIER, TRANSPORTATION, GOVERNMENT } | |
object UserColumns { | |
const val COLUMN_ID = "id" | |
const val COLUMN_NAME = "name" | |
const val COLUMN_EMAIL = "email" | |
const val COLUMN_TYPES = "types" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment