chore: add support for scope relationship to all models

This commit is contained in:
Randall Morey committed 2020-07-15 12:41:58 -04:00
1 parent 20361ef00c
commit 5a438c7bc9
3 files changed
+40 -1

No files matched your search

+10
View File
@@ -1,7 +1,17 @@
import Model from '@ember-data/model';
import { belongsTo } from '@ember-data/model';
import { computed } from '@ember/object';
export default class BaseModel extends Model {
// =relationships
/**
* Scope of this resource, if any.
* @type {ScopeModel}
*/
@belongsTo('scope', {async: false, inverse: false}) scope;
// =attributes
/**
+1 -1
View File
@@ -24,7 +24,7 @@ export default class ScopeModel extends GeneratedScopeModel {
*/
@hasMany('scope', {inverse: 'parentScope'}) childrenScopes;
// =computed
// =attributes
/**
* @type {boolean}