framework/ember/app/models/user.js

21 lines
450 B
JavaScript
Raw Normal View History

2014-12-20 14:26:46 +08:00
import DS from 'ember-data';
export default DS.Model.extend({
username: DS.attr('string'),
email: DS.attr('string'),
password: DS.attr('string'),
avatarUrl: DS.attr('string'),
2014-12-20 14:26:46 +08:00
groups: DS.hasMany('group'),
2014-12-20 14:26:46 +08:00
joinTime: DS.attr('date'),
lastSeenTime: DS.attr('date'),
readTime: DS.attr('date'),
2014-12-20 14:26:46 +08:00
discussionsCount: DS.attr('number'),
postsCount: DS.attr('number'),
2014-12-20 14:26:46 +08:00
canEdit: DS.attr('boolean'),
canDelete: DS.attr('boolean')
2014-12-20 14:26:46 +08:00
});