We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a036d6c commit b170e9fCopy full SHA for b170e9f
core/src/main/kotlin/coursebook/data/Coursebook.kt
@@ -18,4 +18,9 @@ class Coursebook(
18
val semester: Semester,
19
@Field("updated_at")
20
var updatedAt: Instant = Instant.now(),
21
-)
+) : Comparable<Coursebook> {
22
+ override fun compareTo(other: Coursebook): Int =
23
+ compareBy<Coursebook> { it.year }
24
+ .thenBy { it.semester }
25
+ .compare(this, other)
26
+}
0 commit comments