Multiple minors fix and improve
use data class for entity Add sealed on entity interfaces Replace listOf() by setOf() instead of deduplicate use interface instead of EntityRef replace .toLowerCase() to .lowercase() fix test.sh
This commit is contained in:
@@ -8,19 +8,18 @@ import fr.dcproject.common.entity.HasTarget
|
||||
import fr.dcproject.common.entity.TargetI
|
||||
import fr.dcproject.component.citizen.database.CitizenCreator
|
||||
import fr.dcproject.component.citizen.database.CitizenI
|
||||
import fr.dcproject.component.citizen.database.CitizenRef
|
||||
import java.util.UUID
|
||||
|
||||
open class FollowForView<T : TargetI>(
|
||||
id: UUID = UUID.randomUUID(),
|
||||
data class FollowForView<T : TargetI>(
|
||||
override val id: UUID = UUID.randomUUID(),
|
||||
override val createdBy: CitizenCreator,
|
||||
override var target: T
|
||||
) : ExtraI<T, CitizenRef>,
|
||||
) : ExtraI<T, CitizenI>,
|
||||
FollowRef(id),
|
||||
Created<CitizenRef> by Created.Imp(createdBy)
|
||||
Created<CitizenI> by Created.Imp(createdBy)
|
||||
|
||||
class FollowForUpdate<T : TargetI, C : CitizenI>(
|
||||
id: UUID = UUID.randomUUID(),
|
||||
data class FollowForUpdate<T : TargetI, C : CitizenI>(
|
||||
override val id: UUID = UUID.randomUUID(),
|
||||
override val target: T,
|
||||
override val createdBy: C
|
||||
) : FollowRef(id),
|
||||
@@ -31,4 +30,4 @@ open class FollowRef(
|
||||
override val id: UUID
|
||||
) : FollowI
|
||||
|
||||
interface FollowI : EntityI
|
||||
sealed interface FollowI : EntityI
|
||||
|
||||
Reference in New Issue
Block a user