mirror of
https://github.com/flarum/framework.git
synced 2024-12-13 07:03:35 +08:00
25 lines
611 B
JavaScript
25 lines
611 B
JavaScript
import Ember from 'ember';
|
|
import DS from 'ember-data';
|
|
|
|
export default DS.Model.extend({
|
|
discussion: DS.belongsTo('discussion', {inverse: 'loadedPosts'}),
|
|
number: DS.attr('number'),
|
|
|
|
time: DS.attr('date'),
|
|
user: DS.belongsTo('user'),
|
|
type: DS.attr('string'),
|
|
content: DS.attr('string'),
|
|
contentHtml: DS.attr('string'),
|
|
|
|
editTime: DS.attr('date'),
|
|
editUser: DS.belongsTo('user'),
|
|
isEdited: Ember.computed.notEmpty('editTime'),
|
|
|
|
hideTime: DS.attr('date'),
|
|
hideUser: DS.belongsTo('user'),
|
|
isHidden: DS.attr('boolean'),
|
|
|
|
canEdit: DS.attr('boolean'),
|
|
canDelete: DS.attr('boolean')
|
|
});
|