import DS from 'ember-data';

export default DS.Model.extend({
  timestamp: DS.attr('number', {
    defaultValue () { return Date.now(); }
  }),
  name: DS.attr('string'),
  category: DS.attr('string'),
  sum: DS.attr('number')
});

@@ -21,16 +21,49 @@
 r-data';
+%0Aimport moment from 'npm:moment';
 %0A%0Aexport
@@ -89,16 +89,54 @@
 xtend(%7B%0A
+  expenses: DS.belongsTo('expenses'),%0A
   timest
@@ -193,17 +193,263 @@
 urn 
-Date.now(
+moment(/*'2016-11-24', 'YYYY-MM-DD'*/).toDate().getTime(); %7D%0A  %7D),%0A  month: DS.attr('number', %7B%0A    defaultValue () %7B return parseInt(moment().format('MM')); %7D%0A  %7D),%0A  year: DS.attr('number', %7B%0A    defaultValue () %7B return parseInt(moment().format('YYYY')
 ); %7D

Set DS belongsTo for expense to contect it with expenses by date