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:
@@ -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")
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user