simdb.database.models.watcher module¶
- class simdb.database.models.watcher.Watcher(username, email, notification)[source]¶
Bases:
BaseClass to represent people watching simulations for updates.
- NOTIFICATION_CHOICES = {Notification.ALL: 'A', Notification.OBSOLESCENCE: 'O', Notification.REVISION: 'R', Notification.VALIDATION: 'V'}¶
- data(recurse: bool = False) Dict[str, str][source]¶
Serialise the Watcher.
- Parameters:
recurse – If True also serialise any contained models, otherwise only serialise simple fields.
- Returns:
The serialised data.
- email¶
- classmethod from_data(data: Dict) Watcher[source]¶
Create a Model from serialised data.
- Parameters:
data – Serialised model data.
- Returns:
The created model.
- id¶
- notification¶
- username¶