import DS from 'ember-data';

export default DS.Model.extend({
  page: DS.belongsTo('page'),
  eid: DS.attr('string'),
  displayIndex: DS.attr('number'),
  elementType: DS.attr('string'),
  concept: DS.attr('string'),
  question: DS.attr('string'),
  answer: DS.attr('string'),
  choices: DS.attr()
});

import DS from 'ember-data';

let SanaElement = DS.Model.extend({
  page: DS.belongsTo('page'),
  eid: DS.attr('string'),
  displayIndex: DS.attr('number'),
  elementType: DS.attr('string'),
  concept: DS.attr('string'),
  question: DS.attr('string'),
  answer: DS.attr('string'),
  choices: DS.attr()
});

SanaElement.reopenClass({
  TYPES: [
    'ENTRY',
    'SELECT',
    'MULTI_SELECT',
    'RADIO',
    'GPS',
    'SOUND',
    'PICTURE'
  ],
  TYPES_WITH_CHOICES: [
    'SELECT',
    'MULTI_SELECT',
    'RADIO'
  ]
});

export default SanaElement;

Add types to element model