21 lines
704 B
JavaScript
21 lines
704 B
JavaScript
import DS from 'ember-data';
|
|
import Ember from 'ember';
|
|
|
|
export default DS.Model.extend({
|
|
measurements: DS.hasMany('measurements', { async: true }),
|
|
speciesName: DS.attr('string'),
|
|
strainName: DS.attr('string'),
|
|
typeStrain: DS.attr('boolean'),
|
|
etymology: DS.attr('string'),
|
|
accessionBanks: DS.attr('string'),
|
|
genbankEmblDdb: DS.attr('string'),
|
|
isolatedFrom: DS.attr('string'),
|
|
createdAt: DS.attr('date'),
|
|
updatedAt: DS.attr('date'),
|
|
deletedAt: DS.attr('date'),
|
|
author: DS.attr('number'),
|
|
totalMeasurements: DS.attr('number'),
|
|
fullName: Ember.computed('speciesName', 'strainName', function() {
|
|
return this.get('speciesName') + ' (' + this.get('strainName') + ')';
|
|
})
|
|
});
|