Skip to content

Instantly share code, notes, and snippets.

@DisruptiveMind
Created December 1, 2014 15:36
Show Gist options
  • Select an option

  • Save DisruptiveMind/1ecc0f28c43a9a679af2 to your computer and use it in GitHub Desktop.

Select an option

Save DisruptiveMind/1ecc0f28c43a9a679af2 to your computer and use it in GitHub Desktop.

Revisions

  1. DisruptiveMind created this gist Dec 1, 2014.
    35 changes: 35 additions & 0 deletions Models.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    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'
    }
    }