Event/Notification Grund-Models anlegen
Erstnaml nur die grundlegeneden Models/Tabellen und ein, zwei Beispielklassen der Events.
ActiveRecord Models
- Event
- context: polymorphe Beziehung (später)
- object: polymorphe Beziehung
- belongs_to subject: user (nullable)
- type: types (siehe Tabelle)
- attributes: serializable (Hash)
- Notification
- belongs_to: user
- belongs_to: event
- marked_at: timestamp
STI Models
- Events::CommentCreatedEvent
- create_notification -> Ja/Nein
- receivers -> Liste von Usern
PORO
- EventDispatcher
- ziemlich dumbes model
- create_notifications methode
Edited by Michael Prilop