commonMain.org.hisp.dhis.rules.models.Rule.kt Maven / Gradle / Ivy
package org.hisp.dhis.rules.models
data class Rule(
val condition: String,
val actions: List,
val uid: String = "",
val name: String? = null,
val programStage: String? = null,
val priority: Int? = 0,
) : Comparable {
override fun compareTo(other: Rule): Int =
if (this.priority != null && other.priority != null) {
this.priority.compareTo(other.priority)
} else if (this.priority != null) {
-1
} else if (other.priority != null) {
1
} else {
0
}
}