import Model from 'ember-data/model';
import { hasMany } from 'ember-data/relationships';
import computed from 'ember-computed';

export default Model.extend({
  allPosts: hasMany('post'),
  topic: computed.readOnly('page.topic'),
  cursor: computed.readOnly('page.cursor'),
  disabled: computed.readOnly('page.disabled'),
  total: computed.readOnly('page.total'),
  isComplete: computed.readOnly('page.isComplete'),

  page: null,
  posts: computed.readOnly('page.items')
});
