Created
December 9, 2010 03:19
-
-
Save frnz/734286 to your computer and use it in GitHub Desktop.
Diego's version:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User | |
include DataMapper::Resource | |
has n, :projects | |
end | |
class Project | |
include DataMapper::Resource | |
belongs_to :user, :key => true | |
has n, :steps | |
end | |
class Step | |
include DataMapper::Resource | |
belongs_to :project, :key => true | |
has n, :images | |
end | |
class Image | |
include DataMapper::Resource | |
belongs_to :step, :key => true | |
has n, :notes | |
end | |
class Note | |
include DataMapper::Resource | |
belongs_to :image, :key => true | |
has n, :comments | |
end | |
class Comment | |
include DataMapper::Resource | |
belongs_to :note, :key => true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment