Rough in characteristic types, add meas optgroups

This commit is contained in:
Matthew Dillon 2015-06-16 15:47:29 -08:00
parent f17707fb6d
commit 3c1fca43b8
9 changed files with 126 additions and 20 deletions

View file

@ -0,0 +1,12 @@
import DS from 'ember-data';
export default DS.Model.extend({
characteristicTypeName: DS.attr('string'),
characteristics: DS.hasMany('characteristic', { async: true }),
createdAt: DS.attr('date'),
updatedAt: DS.attr('date'),
deletedAt: DS.attr('date'),
createdBy: DS.attr('number'),
updatedBy: DS.attr('number'),
deletedBy: DS.attr('number')
});

View file

@ -2,7 +2,7 @@ import DS from 'ember-data';
export default DS.Model.extend({
characteristicName: DS.attr('string'),
characteristicType: DS.attr('string'),
characteristicType: DS.belongsTo('characteristicType', { async: true }),
strains : DS.hasMany('strain', { async: true }),
measurements : DS.hasMany('measurements', { async: true }),
createdAt : DS.attr('date'),