mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 15:03:44 +08:00
27 lines
615 B
JavaScript
27 lines
615 B
JavaScript
import Ember from 'ember';
|
|
import DS from 'ember-data';
|
|
|
|
export default DS.Model.extend({
|
|
|
|
discussion: DS.belongsTo('discussion', {inverse: null}),
|
|
number: DS.attr('number'),
|
|
|
|
time: DS.attr('string'),
|
|
user: DS.belongsTo('user'),
|
|
type: DS.attr('string'),
|
|
content: DS.attr('string'),
|
|
contentHtml: DS.attr('string'),
|
|
|
|
editTime: DS.attr('string'),
|
|
editUser: DS.belongsTo('user'),
|
|
edited: Ember.computed.notEmpty('editTime'),
|
|
|
|
deleteTime: DS.attr('string'),
|
|
deleteUser: DS.belongsTo('user'),
|
|
deleted: Ember.computed.notEmpty('deleteTime'),
|
|
|
|
canEdit: DS.attr('boolean'),
|
|
canDelete: DS.attr('boolean')
|
|
|
|
});
|