VoteAggregation return total votes and the score
This commit is contained in:
@@ -5,5 +5,5 @@ interface Votable {
|
||||
}
|
||||
|
||||
class VotableImp : Votable {
|
||||
override var votes: VoteAggregation = VoteAggregation(0, 0, 0)
|
||||
override var votes: VoteAggregation = VoteAggregation()
|
||||
}
|
||||
@@ -7,6 +7,10 @@ import fr.postgresjson.entity.EntityUpdatedAtImp
|
||||
open class VoteAggregation(
|
||||
val up: Int,
|
||||
val neutral: Int,
|
||||
val down: Int
|
||||
val down: Int,
|
||||
val total: Int,
|
||||
val score: Int
|
||||
) : EntityI,
|
||||
EntityUpdatedAt by EntityUpdatedAtImp()
|
||||
EntityUpdatedAt by EntityUpdatedAtImp() {
|
||||
constructor() : this(0, 0, 0, 0, 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user