Rough in characteristic types, add meas optgroups
This commit is contained in:
		
							parent
							
								
									f17707fb6d
								
							
						
					
					
						commit
						3c1fca43b8
					
				
					 9 changed files with 126 additions and 20 deletions
				
			
		
							
								
								
									
										12
									
								
								app/models/characteristic-type.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								app/models/characteristic-type.js
									
										
									
									
									
										Normal 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')
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			@ -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'),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue