Closed drewjbartlett closed 6 years ago
Say I have a User model and that user has Notifications. It'd be nice to either say this:
class User extends Rapid { boot () { this.notifications = new Rapid({ childOf: this }); } }
Or it'd be nice to:
let User = new Rapid({ modelName: 'user', children: [{ modelName: 'notifications' }, { modelName: 'meta' }] })
this would result in being able to do:
User.notifications.post('mark-as-read'); // => /api/user/notifications/mark-as-read
Say I have a User model and that user has Notifications. It'd be nice to either say this:
Or it'd be nice to:
this would result in being able to do: