loopback/node_modules/model/README.md

883 B

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.