parent
695eb65806
commit
17651e071e
14 changed files with 296 additions and 8 deletions
11
app/models/region.js
Normal file
11
app/models/region.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
import DS from 'ember-data';
|
||||
|
||||
const { Model, attr, hasMany } = DS;
|
||||
|
||||
export default Model.extend({
|
||||
name: attr('string'),
|
||||
code: attr('string'),
|
||||
sortOrder: attr('number'),
|
||||
|
||||
site: hasMany('site'),
|
||||
});
|
13
app/models/site.js
Normal file
13
app/models/site.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
import DS from 'ember-data';
|
||||
|
||||
const { Model, attr, hasMany, belongsTo } = DS;
|
||||
|
||||
export default Model.extend({
|
||||
name: attr('string'),
|
||||
code: attr('string'),
|
||||
description: attr('string'),
|
||||
sortOrder: attr('number'),
|
||||
|
||||
region: belongsTo('region'),
|
||||
studyLocation: hasMany('study-location'),
|
||||
});
|
|
@ -1,6 +1,6 @@
|
|||
import DS from 'ember-data';
|
||||
|
||||
const { Model, attr } = DS;
|
||||
const { Model, attr, belongsTo } = DS;
|
||||
|
||||
export default Model.extend({
|
||||
name: attr('string'),
|
||||
|
@ -10,4 +10,6 @@ export default Model.extend({
|
|||
collectingLocation: attr('string'),
|
||||
description: attr('string'),
|
||||
sortOrder: attr('number'),
|
||||
|
||||
site: belongsTo('site'),
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue