File tree 3 files changed +28
-55
lines changed
app/src/main/java/io/intrepid/contest/models
3 files changed +28
-55
lines changed Original file line number Diff line number Diff line change @@ -61,16 +61,6 @@ open class Contest {
61
61
description = `in `.readString()
62
62
}
63
63
64
- fun setTitle (title : String ): Builder {
65
- this .title = title
66
- return this
67
- }
68
-
69
- fun setDescription (description : String ): Builder {
70
- this .description = description
71
- return this
72
- }
73
-
74
64
fun build (): Contest {
75
65
if (creationDate == null ) {
76
66
creationDate = Date ()
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ package io.intrepid.contest.models
2
+
3
+ import com.google.gson.annotations.SerializedName
4
+
5
+ import java.util.UUID
6
+
7
+ class Score (category : Category , score : Int ) {
8
+ var scoreValue: Int = 0
9
+ internal set
10
+ @SerializedName(" scoring_category_id" )
11
+ private val categoryId: UUID ?
12
+ @Transient val categoryName: String?
13
+ @Transient val categoryDescription: String?
14
+
15
+ init {
16
+ this .categoryId = category.id
17
+ this .categoryName = category.name
18
+ this .categoryDescription = category.description
19
+ this .scoreValue = score
20
+ }
21
+
22
+ override fun equals (other : Any? ): Boolean {
23
+ if (other !is Score ) {
24
+ return false
25
+ }
26
+ return scoreValue == other.scoreValue
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments