1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-04 13:05:23 +02:00

Create attachment model and push attachment data into store

This commit is contained in:
zinyando 2016-08-11 14:38:36 +02:00
parent d47f1e11b8
commit b638d6a114
5 changed files with 67 additions and 49 deletions

View file

@ -1,7 +1,19 @@
import Model from 'ember-data/model';
// import attr from 'ember-data/attr';
import attr from 'ember-data/attr';
import stringUtil from '../utils/string';
import Ember from 'ember';
// import { belongsTo, hasMany } from 'ember-data/relationships';
export default Model.extend({
author: attr('string'),
dated: attr(),
description: attr('string'),
title: attr('string'),
type: attr('number', { defaultValue: 0 }),
slug: Ember.computed('title', function () {
return stringUtil.makeSlug(this.get('title'));
}),
created: attr(),
revised: attr()
});