Created
February 6, 2019 06:55
-
-
Save CesarValiente/bae25ac9ea316530408cdec79ac1d5f0 to your computer and use it in GitHub Desktop.
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
@RealmClass | |
open class Item() : RealmModel { | |
constructor(localId: String, text: String?, favorite: Boolean = false, | |
colorEnum: Color = Color.WHITE, position: Long) : this() { | |
this.localId = localId | |
this.text = text | |
this.favorite = favorite | |
this.color = colorEnum.name | |
this.position = position | |
} | |
@PrimaryKey open var localId: String = "" | |
open var text: String? = null | |
open var favorite: Boolean = false | |
@Ignore private var colorEnum: Color = Color.WHITE | |
open var color: String = colorEnum.name | |
open var position: Long = 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment