Can Comment a Comment
This commit is contained in:
@@ -7,12 +7,26 @@ open class Comment <T : UuidEntity> (
|
||||
id: UUID = UUID.randomUUID(),
|
||||
createdBy: Citizen,
|
||||
target: T,
|
||||
override var targetReference: String = target::class.simpleName!!.toLowerCase(),
|
||||
var content: String,
|
||||
var responses: List<Comment<T>>? = null,
|
||||
val responses: List<Comment<T>>? = null,
|
||||
var parent: Comment<T>? = null,
|
||||
var parentsIds: List<UUID>? = null,
|
||||
val parentsIds: List<UUID>? = null,
|
||||
val childrenCount: Int? = null
|
||||
) : Extra<T>(id, createdBy, target),
|
||||
EntityUpdatedAt by EntityUpdatedAtImp(),
|
||||
EntityDeletedAt by EntityDeletedAtImp(),
|
||||
Votable by VotableImp()
|
||||
{
|
||||
constructor(
|
||||
createdBy: Citizen,
|
||||
parent: Comment<T>,
|
||||
content: String
|
||||
) : this(
|
||||
createdBy = createdBy,
|
||||
parent = parent,
|
||||
target = parent.target,
|
||||
targetReference = parent.targetReference,
|
||||
content = content
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user