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:
2022-03-03 19:42:18 +01:00
parent 1c013e3e15
commit f380231e1e
32 changed files with 180 additions and 179 deletions

View File

@@ -53,11 +53,11 @@ open class NotificationMessage(
}
open class EntityNotificationMessage <E : Entity> (
val target: E,
open val target: E,
type: String,
val action: String
) : NotificationMessage(type)
class ArticleUpdateNotificationMessage(
target: ArticleForView
data class ArticleUpdateNotificationMessage(
override val target: ArticleForView
) : EntityNotificationMessage<ArticleForView>(target, "article", "update")

View File

@@ -3,7 +3,7 @@ package fr.dcproject.component.notification.email.content
import fr.dcproject.component.article.database.ArticleWithTitleI
import fr.dcproject.component.citizen.database.Citizen
class ArticleNotificationEmailContent(
data class ArticleNotificationEmailContent(
private val citizen: Citizen,
private val target: ArticleWithTitleI,
private val domain: String,

View File

@@ -2,7 +2,7 @@ package fr.dcproject.component.notification.email.content
import fr.dcproject.component.citizen.database.Citizen
class CitizenNotificationEmailContent(
data class CitizenNotificationEmailContent(
private val citizen: Citizen,
private val target: Citizen,
private val domain: String,