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:
parent
d47f1e11b8
commit
b638d6a114
5 changed files with 67 additions and 49 deletions
|
@ -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()
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue