Data model
According to the Feathers philosophy each data model is manipulated using a service interface to perform CRUD operations of the persistence layer. So this data model-oriented view is a service-oriented view in the same manner.
Because data models internally rely on JSON they are by nature hierarchical. In the following example diagrams each nested JSON object is represented as a smaller bubble in a bigger bubble (the nesting/parent object), the data model instance being the root JSON object or the biggest bubble. The name of the bubble is the name of the nesting object property owing the nested object.
Data models are dynamic by nature, allowing any plugin to add custom fields whenever required using hooks. Each data model includes an implicit ObjectID _id
field provided by the database.
User data model
The most common properties of a user are described by the following data model:
The details of each property are the following:
- email : user e-mail used as an internal unique ID
- password : hashed user password
- locale : user locale when registering
- previousPasswords : hashed user password history if password policy has been enabled
- profile : user profile information including name
- [provider] : user profile information for associated OAuth provider, e.g.
google
- [scope] : user permissions for associated scope, e.g.
groups
- subscriptions : user web push subscriptions if any
Subscription data model
As per feathers-webpush, subscriptions are attached to users through the subscriptions
property.
Notification data model
As per feathers-webpush, notifications are sent according to subscriptions are attached to users.
This data model is manipulated through the push service.