ENH: Collection attachments (#51)

This commit is contained in:
Matthew Ryan Dillon 2017-12-01 10:58:17 -07:00 committed by GitHub
parent d014fc099c
commit 4903a204e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 217 additions and 16 deletions

View file

@ -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'),

View 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'),
});