|
|
|
|
@ -3,8 +3,6 @@ package net.pokeranalytics.android.model.realm |
|
|
|
|
import io.realm.Realm |
|
|
|
|
import io.realm.RealmList |
|
|
|
|
import io.realm.RealmObject |
|
|
|
|
import io.realm.RealmResults |
|
|
|
|
import io.realm.annotations.LinkingObjects |
|
|
|
|
import io.realm.annotations.PrimaryKey |
|
|
|
|
import io.realm.kotlin.where |
|
|
|
|
import net.pokeranalytics.android.R |
|
|
|
|
@ -34,9 +32,6 @@ open class Bankroll() : RealmObject(), NameManageable, StaticRowRepresentableDat |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@LinkingObjects("bankroll") |
|
|
|
|
private val sessions: RealmResults<Session>? = null |
|
|
|
|
|
|
|
|
|
@PrimaryKey |
|
|
|
|
override var id = UUID.randomUUID().toString() |
|
|
|
|
|
|
|
|
|
@ -51,12 +46,6 @@ open class Bankroll() : RealmObject(), NameManageable, StaticRowRepresentableDat |
|
|
|
|
// The currency of the bankroll |
|
|
|
|
var currency: Currency? = null |
|
|
|
|
|
|
|
|
|
fun currencyCodeHasBeenUpdated() { |
|
|
|
|
sessions?.forEach { |
|
|
|
|
it.bankrollHasBeenUpdated() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
override fun getDisplayName(): String { |
|
|
|
|
return this.name |
|
|
|
|
} |
|
|
|
|
|