Skip to content

Instantly share code, notes, and snippets.

@awildeep
Created June 23, 2014 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awildeep/09888ab1a9456cc748fc to your computer and use it in GitHub Desktop.
Save awildeep/09888ab1a9456cc748fc to your computer and use it in GitHub Desktop.
Examples for http://discuss.emberjs.com/ post
App.Artist = DS.Model.extend({
name: DS.attr('string'),
picture: DS.attr('string'),
albums: DS.hasMany('album'),
});
App.Album = DS.Model.extend({
name: DS.attr('string'),
genre: DS.attr('string'),
cover: DS.attr('string'),
description: DS.attr('string'),
artist: DS.belongsTo('artist'),
tracks: DS.hasMany('track')
});
App.Track = DS.Model.extend({
name: DS.attr(),
number: DS.attr(),
length: DS.attr(),
artist: DS.attr(),
filename: DS.attr(),
album: DS.belongsTo('album')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment