Class NotificationTemplateBase

java.lang.Object
io.leandev.appfuse.notification.template.NotificationTemplateBase

@MappedSuperclass public abstract class NotificationTemplateBase extends Object

可客製通知範本的欄位基類(per-locale 覆寫某通知型別×通道的主旨 / 內文)

DbNotificationTemplateResolver 查找;查無時退回 NlsNotificationTemplateResolver 的訊息束預設。

ADR-017:框架 jar 不擁有 @Entity——本類為 @MappedSuperclass(欄位),具體 @Entity(表名、唯一約束、租戶性)由應用 宣告。租戶欄位與「全域範本」語意皆不在此:舊版以 tenant_id = null 表達全域範本(決策六已否決 ——nullable uk 欄位在 SQL Server / Oracle 語意下失效),改由應用宣告兩個 entity(租戶覆寫表帶 @TenantId、全域表無租戶欄位),解析鏈以「租戶表 → 全域表 → 訊息束」串接兩個 DbNotificationTemplateResolver 實例表達優先序。

locale NOT NULL(決策五:uk 欄位一律 NOT NULL)——「不分語系」以 wildcard 哨兵 ANY_LOCALE*)表達,不再以 null 偷渡第二語意;對外 REST 契約的 locale: null 由應用於 DTO 邊界對映 null ⇄ '*'

Since:
4.0.0
  • Field Details

    • ANY_LOCALE

      public static final String ANY_LOCALE
      「不分語系」wildcard 哨兵(locale NOT NULL,以此值取代舊版的 null 語意)
      See Also:
  • Constructor Details

    • NotificationTemplateBase

      public NotificationTemplateBase()