A LoopBack model represents data in backend systems such as databases, and by default has both Node and REST APIs. Additionally, you can add functionality such as validation rules and business logic to models.
Additionally, you can define your own custom models specific to your application:
- Use the
slc loopback:modelmodel generator to create cusom models from scratch. This creates a Model definition JSON file that defines your model in LoopBack.
Datasource.buildModelFromInstance()to create dynamic schema-less models for data sources such as SOAP and REST services. See Creating models from unstructured data for more information.
- For data sources backed by a relational database, a model typically corresponds to a table. Use model discovery to create static, schema-driven models for database-backed data sources. See Discovering models from relational databases for more information.