Files
dc-project/src/main/kotlin/fr/dcproject/entity/Comment.kt
Fabrice Lecomte c156e2a7b1 SQL functions find_comments_* now return VotesAggregates
create Votable Interface
remove usless "resourceTarget" argument for SQL function "count_vote"
2019-10-08 00:26:41 +02:00

19 lines
527 B
Kotlin

package fr.dcproject.entity
import fr.postgresjson.entity.*
import java.util.*
open class Comment <T: UuidEntity> (
id: UUID = UUID.randomUUID(),
createdBy: Citizen,
target: T,
var content: String,
var responses: List<Comment<T>>? = null,
var parent: Comment<T>? = null,
var parentsIds: List<UUID>? = null,
val childrenCount: Int? = null
): Extra<T>(id, createdBy, target),
EntityUpdatedAt by EntityUpdatedAtImp(),
EntityDeletedAt by EntityDeletedAtImp(),
Votable by VotableImp()