mirror of
https://gitlab.silvrtree.co.uk/martind2000/project.git
synced 2025-01-11 00:05:08 +00:00
20 lines
499 B
JavaScript
20 lines
499 B
JavaScript
import DS from 'ember-data';
|
|
|
|
export default DS.Model.extend({
|
|
uid: DS.attr('string'),
|
|
forename: DS.attr('string'),
|
|
surname: DS.attr('string'),
|
|
gender: DS.attr('number'),
|
|
dob: DS.attr(),
|
|
bio: DS.attr('string'),
|
|
fullName: function() {
|
|
return '%@ %@'.fmt(this.get('forename'), this.get('surname'));
|
|
}.property('forename', 'surname'),
|
|
qualifiedGender: function() {
|
|
let genderArray = ['Male', 'Female'];
|
|
return genderArray[this.get('gender')];
|
|
}.property('gender')
|
|
});
|
|
|
|
|