Skip to content

Instantly share code, notes, and snippets.

@NoiseEee
Last active September 9, 2016 21:05
Show Gist options
  • Save NoiseEee/b88f15e4eb4a0191b636a9b8bb93333b to your computer and use it in GitHub Desktop.
Save NoiseEee/b88f15e4eb4a0191b636a9b8bb93333b to your computer and use it in GitHub Desktop.
import Ember from 'ember';
import DS from 'ember-data';
export default DS.Model.extend({
firstName: DS.attr(),
lastName: DS.attr(),
fullName: Ember.computed('firstName','lastName', function() {
return `${this.get('firstName')} ${this.get('lastName')}`;
}),
equipmentItems: DS.hasMany('equipment-item'),
jobs: DS.hasMany('job'),
survey: DS.belongsTo('survey')
});
import DS from 'ember-data';
export default DS.Model.extend({
client: DS.attr(),
contact: DS.attr(),
address: DS.attr(),
fullAddress: DS.attr(),
jobNumber: DS.attr(),
surveyComplete: DS.attr('boolean'),
uploadsComplete: DS.attr('boolean'),
admin: DS.belongsTo('admin'),
survey: DS.belongsTo('survey')
});
import DS from 'ember-data';
export default DS.Model.extend({
name: DS.attr(),
instructions: DS.attr(),
type: DS.attr(),
admin: DS.belongsTo('admin'),
job: DS.belongsTo('job'),
surveySections: DS.hasMany('survey-section')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment