ENH: Collection attachments (#51)
This commit is contained in:
parent
d014fc099c
commit
4903a204e4
14 changed files with 217 additions and 16 deletions
|
@ -19,6 +19,7 @@ export default Model.extend({
|
|||
adfgPermit: belongsTo('adfg-permit'),
|
||||
|
||||
collectionSpecies: hasMany('collection-species'),
|
||||
datasheets: hasMany('datasheet-attachment'),
|
||||
|
||||
// computed
|
||||
species: computed.mapBy('collectionSpecies', 'species'),
|
||||
|
|
9
app/models/datasheet-attachment.js
Normal file
9
app/models/datasheet-attachment.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
import DS from 'ember-data';
|
||||
|
||||
const { Model, attr, belongsTo } = DS;
|
||||
|
||||
export default Model.extend({
|
||||
datasheet: attr('file'),
|
||||
|
||||
collection: belongsTo('collection'),
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue