Skip to content

Instantly share code, notes, and snippets.

@fabien
Last active August 29, 2015 14:05
Show Gist options
  • Save fabien/ccce7f1de399c0227ce6 to your computer and use it in GitHub Desktop.
Save fabien/ccce7f1de399c0227ce6 to your computer and use it in GitHub Desktop.
Example LDL
{
"name": "Person",
"plural": "people",
"base": "PersistedModel",
"properties": {
"firstName": {
"type": "string",
"required": true
},
"lastName": {
"type": "string"
}
},
"validations": [],
"relations": {
"addresses": {
"type": "embedsMany",
"model": "Location",
"options": {
"validate": true,
"autoId": false
}
},
"pictures": {
"type": "hasMany",
"model": "Picture",
"polymorphic": "imageable"
}
},
"acls": [],
"methods": [],
"mixins": {
"ObjectId": true
}
}
{
"name": "Picture",
"plural": "pictures",
"base": "PersistedModel",
"properties": {
"name": {
"type": "string",
"required": true
}
},
"validations": [],
"relations": {
"imageable": {
"type": "belongsTo",
"polymorphic": true
}
},
"acls": [],
"methods": [],
"mixins": {
"ObjectId": true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment