loopback/node_modules/model
Ritchie Martori a9f27183fa Doc updates 2013-04-26 10:10:13 -07:00
..
example Initial working store, model, connection, and collection 2013-04-10 10:55:13 -07:00
lib Add model options 2013-04-19 09:51:06 -07:00
test Initial working store, model, connection, and collection 2013-04-10 10:55:13 -07:00
.gitignore Initial working store, model, connection, and collection 2013-04-10 10:55:13 -07:00
README.md Doc updates 2013-04-26 10:10:13 -07:00
index.js Initial working store, model, connection, and collection 2013-04-10 10:55:13 -07:00
package.json Initial working store, model, connection, and collection 2013-04-10 10:55:13 -07:00

README.md

model

About

A Model represents the data of your application. Asteroid Models are mostly used for validating interactions with a DataSource. Usually your models will correspond to a namespace in your data source (database table, http url, etc). The bulk of your application's business logic will be in your Model or Node.js scripts that require your model.

Options

namespace

A table, collection, url, or other namespace.

properties

An array of properties describing the model's schema.

"properties": [
    {
      "name": "title",
      "type": "string"
    },
    {
      "name": "done",
      "type": "boolean"
    },
    {
      "name": "order",
      "type": "number"
    }
  ]
}

Dependencies

data source

A data-source for persisting data.