import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import computed from 'ember-computed';

export default Model.extend({
  name: attr('string'),
  viewers: attr('number'),
  channels: attr('number'),
  follwer_count: attr('number'),
  avatar_image_url: attr('string'),
  cover_image_url: attr('string'),
  rules: attr('string'),
  rules_html: attr('string'),
  description: attr('string'),
  description_html: attr('string'),
  summary: attr('string'),

  url: computed('name', function () {
    let name = this.get('name');
    return `/communities/${name}`;
  })
});
