This repository has been archived on 2025-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
hymenobacterdotinfo/app/models/strain.js
2015-06-11 11:23:56 -08:00

23 lines
804 B
JavaScript

import DS from 'ember-data';
import Ember from 'ember';
export default DS.Model.extend({
measurements: DS.hasMany('measurements', { async: true }),
species: DS.belongsTo('species', { async: true }),
strainName: DS.attr('string'),
typeStrain: DS.attr('boolean'),
accessionNumbers: DS.attr('string'),
genbank: DS.attr('string'),
isolatedFrom: DS.attr('string'),
notes: DS.attr('string'),
createdAt: DS.attr('date'),
updatedAt: DS.attr('date'),
deletedAt: DS.attr('date'),
createdBy: DS.attr('number'),
updatedBy: DS.attr('number'),
deletedBy: DS.attr('number'),
totalMeasurements: DS.attr('number'),
fullName: Ember.computed('species.speciesName', 'strainName', function() {
return this.get('species.speciesName') + ' (strain ' + this.get('strainName') + ')';
})
});