|
|
|
|
@ -42,9 +42,12 @@ import java.util.* |
|
|
|
|
import java.util.Currency |
|
|
|
|
import kotlin.collections.ArrayList |
|
|
|
|
|
|
|
|
|
typealias BB = Double |
|
|
|
|
|
|
|
|
|
open class Session : RealmObject(), Savable, Editable, StaticRowRepresentableDataSource, RowRepresentable, Timed, |
|
|
|
|
TimeFilterable, Filterable { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum class Type { |
|
|
|
|
CASH_GAME, |
|
|
|
|
TOURNAMENT |
|
|
|
|
@ -293,7 +296,7 @@ open class Session : RealmObject(), Savable, Editable, StaticRowRepresentableDat |
|
|
|
|
/** |
|
|
|
|
* The net result in big blinds |
|
|
|
|
*/ |
|
|
|
|
val bbNet: Double |
|
|
|
|
val bbNet: BB |
|
|
|
|
get() { |
|
|
|
|
val bb = this.cgBigBlind; val result = this.result |
|
|
|
|
if (bb != null && result != null) { |
|
|
|
|
@ -367,7 +370,7 @@ open class Session : RealmObject(), Savable, Editable, StaticRowRepresentableDat |
|
|
|
|
throw ModelException("Session should have an existing Result relationship") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
val bbHourlyRate: Double |
|
|
|
|
val bbHourlyRate: BB |
|
|
|
|
get() { |
|
|
|
|
return this.bbNet / this.hourlyDuration |
|
|
|
|
} |
|
|
|
|
|