feature #7: Add routes for comment article

This commit is contained in:
2019-08-27 22:24:38 +02:00
parent ff1e34c616
commit 1fb0e39038
12 changed files with 364 additions and 10 deletions

View File

@@ -0,0 +1,17 @@
package fr.dcproject.entity
import fr.postgresjson.entity.EntityUpdatedAt
import fr.postgresjson.entity.EntityUpdatedAtImp
import fr.postgresjson.entity.UuidEntity
import java.util.*
open class Comment <T: UuidEntity> (
id: UUID = UUID.randomUUID(),
createdBy: Citizen,
override var target: T,
var content: String,
var responses: List<Comment<T>>? = null,
var parent: Comment<T>? = null,
var parentsIds: List<UUID>? = null
): Extra<T>(id, createdBy),
EntityUpdatedAt by EntityUpdatedAtImp()

View File

@@ -10,7 +10,7 @@ interface ExtraI <T: EntityI<UUID>>:
var target: T
}
abstract class Extra<T: EntityI<UUID>>(
abstract class Extra<T: UuidEntity>(
id: UUID? = UUID.randomUUID(),
createdBy: Citizen
):