mirror of
https://github.com/flarum/framework.git
synced 2025-02-12 23:06:16 +08:00
24 lines
540 B
JavaScript
24 lines
540 B
JavaScript
import DS from 'ember-data';
|
|
|
|
export default DS.Model.extend({
|
|
|
|
username: DS.attr('string'),
|
|
avatarUrl: DS.attr('string'),
|
|
joinTime: DS.attr('date'),
|
|
lastSeenTime: DS.attr('date'),
|
|
discussionsCount: DS.attr('number'),
|
|
postsCount: DS.attr('number'),
|
|
|
|
canEdit: DS.attr('boolean'),
|
|
canDelete: DS.attr('boolean'),
|
|
|
|
groups: DS.hasMany('group'),
|
|
|
|
email: DS.attr('string'),
|
|
password: DS.attr('string'),
|
|
|
|
avatarNumber: function() {
|
|
return Math.random() > 0.3 ? Math.floor(Math.random() * 19) + 1 : null;
|
|
}.property()
|
|
});
|