Created
December 1, 2014 15:36
-
-
Save DisruptiveMind/1ecc0f28c43a9a679af2 to your computer and use it in GitHub Desktop.
SailsJS/Waterline Collection with custom data?
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
| AssetPackage = { | |
| schema: true, | |
| attributes: { | |
| name: { | |
| type: 'string', | |
| required: true | |
| }, | |
| assets: { | |
| collection: 'Asset', | |
| via: 'pack' | |
| }, | |
| // Planning to put array of assets' CustomData here | |
| /* | |
| assetData: [ | |
| {asset: INDEX_OF_ASSETS, data: {...}} | |
| ] | |
| */ | |
| } | |
| Asset = { | |
| schema: true, | |
| attributes: { | |
| name: { | |
| type: 'string', | |
| required: true | |
| }, | |
| pack: { | |
| model: 'AssetPackage' | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment