PostableModel is a BaseModel mixin which adds posting capabilities to models you create.
class Group extends PostableModel(BaseModel) {
constructor(doc){
super(doc);
}
}
addPost(body) - Add a post connected to the model.
posts(options) - Retrieve the posts for the model. Signature of options
param is the same as you would pass to Collection.find()
.
Extends BaseModel, Implements CommentableModel and LikeableModel
Model for the record of each post on a connected Model.
poster() - The user who added the post to the feed. Poster may return the same as user if the user created the post in their own feed.
canRemove() - Check if the user is allowed to delete the post. The poster and the owner can both delete the post.
canUpdate() - Check if the user is allowed to update the post. Only poster can change a post.