Skip to content

Instantly share code, notes, and snippets.

@kbjr
Created October 14, 2012 02:47
Show Gist options
  • Save kbjr/3887079 to your computer and use it in GitHub Desktop.
Save kbjr/3887079 to your computer and use it in GitHub Desktop.
Models
Pak {
id: String,
name: String,
description: String,
pages: [ Page ]
}
Page {
id: String,
title: String,
components: [ Component ]
}
Component {
id: String,
type: String
}
//
// An HtmlComponent either has `content` or `subcomponents`, having
// both doesn't really make sense
//
HtmlComponent <= Component {
tag: String,
content: String,
attributes: Object,
subcomponents: [ HtmlComponent ]
}
AccordionComponent <= Component {
subcomponents: [ AccordionSubcomponent ]
}
AccordionSubcomponent <= Component {
dt: String,
dd: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment