Relationships
The model layer uses standard WPFluent relation helpers such as belongsTo, hasMany, belongsToMany, and hasManyThrough.
Relationship Inventory
| Source | Method | Type | Target |
|---|---|---|---|
Activity | feed | belongsTo | Feed |
Activity | space | belongsTo | BaseSpace |
Activity | user | belongsTo | User |
Activity | xprofile | belongsTo | XProfile |
BaseSpace | owner | belongsTo | User |
BaseSpace | space_pivot | belongsTo | SpaceUserPivot |
BaseSpace | admins | belongsToMany | User |
BaseSpace | posts | hasMany | Feed |
BaseSpace | comments | hasManyThrough | Comment |
BaseSpace | members | belongsToMany | User |
BaseSpace | x_members | belongsToMany | XProfile |
BaseSpace | group | belongsTo | SpaceGroup |
Comment | user | belongsTo | User |
Comment | xprofile | belongsTo | XProfile |
Comment | media | hasOne | Media |
Comment | post | belongsTo | Feed |
Comment | space | hasOneThrough | BaseSpace |
Comment | reactions | hasMany | Reaction |
Feed | user | belongsTo | User |
Feed | xprofile | belongsTo | XProfile |
Feed | space | belongsTo | BaseSpace |
Feed | comments | hasMany | Comment |
Feed | reactions | hasMany | Reaction |
Feed | follows | hasMany | Follow |
Feed | surveyVotes | hasMany | Reaction |
Feed | terms | belongsToMany | Term |
Feed | activities | hasMany | Activity |
Feed | notifications | hasMany | Notification |
Feed | media | hasMany | Media |
Media | feed | belongsTo | Feed |
Media | user | belongsTo | User |
Media | xprofile | belongsTo | XProfile |
Notification | subscribers | hasMany | NotificationSubscriber |
Notification | subscriber | hasOne | NotificationSubscriber |
Notification | feed | belongsTo | Feed |
Notification | src_user | belongsTo | User |
Notification | xprofile | belongsTo | XProfile |
NotificationSubscriber | user | belongsTo | User |
NotificationSubscriber | xprofile | belongsTo | XProfile |
NotificationSubscriber | notification | belongsTo | Notification |
NotificationSubscription | user | belongsTo | User |
NotificationSubscription | xprofile | belongsTo | XProfile |
Reaction | user | belongsTo | User |
Reaction | xprofile | belongsTo | XProfile |
Reaction | feed | belongsTo | Feed |
Reaction | comment | belongsTo | Comment |
SidebarLink | owner | belongsTo | User |
SidebarLink | space_pivot | belongsTo | SpaceUserPivot |
SidebarLink | admins | belongsToMany | User |
SidebarLink | posts | hasMany | Feed |
SidebarLink | comments | hasManyThrough | Comment |
SidebarLink | members | belongsToMany | User |
SidebarLink | x_members | belongsToMany | XProfile |
SidebarLink | group | belongsTo | SpaceGroup |
Space | owner | belongsTo | User |
Space | space_pivot | belongsTo | SpaceUserPivot |
Space | admins | belongsToMany | User |
Space | posts | hasMany | Feed |
Space | comments | hasManyThrough | Comment |
Space | members | belongsToMany | User |
Space | x_members | belongsToMany | XProfile |
Space | group | belongsTo | SpaceGroup |
SpaceGroup | owner | belongsTo | User |
SpaceGroup | spaces | hasMany | BaseSpace |
SpaceUserPivot | user | belongsTo | User |
SpaceUserPivot | xprofile | belongsTo | XProfile |
SpaceUserPivot | space | belongsTo | BaseSpace |
Term | posts | belongsToMany | Feed |
Term | base_spaces | belongsToMany | BaseSpace |
UserMeta | user | belongsTo | User |
XProfile | user | belongsTo | User |
XProfile | contact | hasOne | Contact |
XProfile | spaces | belongsToMany | BaseSpace |
XProfile | posts | hasMany | Feed |
XProfile | follows | hasMany | Follow |
XProfile | followers | hasMany | Follow |
XProfile | comments | hasMany | Comment |
XProfile | courses | belongsToMany | Course |
XProfile | space_pivot | belongsTo | SpaceUserPivot |
XProfile | community_role | belongsTo | Meta |