@apex-pub/convector-core-model
TypeScript icon, indicating that this package has built-in type declarations

1.5.0 • Public • Published

Convector Model

This module contains the base model to be used as a base for any other model.

Usage

The children classes can be used in 1 of 3 ways:

As an model query

class MyModel extends ConvectorModel<MyModel> { ... }

const model = new MyModel(id);
model.fetch()
  .then(onModelFound)
  .catch(onModelNotFound);

As a param constructor and validator

class MyModel extends ConvectorModel<MyModel> { /* ... */ }

@Controller('my-controller')
class MyController {
  @Invokable()
  public async myMethod(
    @Param(MyModel)
    myModel: MyModel
  ) {
    myModel.save();
  }
}

As a container to start filling the model

class MyModel extends ConvectorModel<MyModel> { /* ... */ }

const myModel = new MyModel();
myModel.name = 'name';
myModel.info = 'info';
/* ... */
myModel.save();

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.5.076latest
1.4.1-4-alpha.5f94f88e0canary

Version History

VersionDownloads (Last 7 Days)Published
1.5.076
1.4.1-4-alpha.5f94f88e0
1.4.1-4-alpha.808cd0290
1.4.1-4-alpha.71b29c8b0
1.4.1-4-alpha.c429017f0
1.4.1-4-alpha.e17c6b860
1.4.1-4-alpha.5d0544b60
1.4.1-4-alpha.4ece38f30
1.4.1-4-alpha.8939dce70
1.4.1-4-alpha.8d3ff6860
1.4.1-4-alpha.6064f94c0
1.4.1-4-alpha.aa4051580
1.4.1-2.00
1.4.1-1.4.1-node20.00
1.4.1-00
1.4.00
1.3.12-1-alpha.c6e79dc10
1.3.12-1-alpha.7f254bb00
1.3.12-1-alpha.e89c91080
1.3.12-1-alpha.68de78fd0
1.3.12-1-alpha.d64b57e00
1.3.10-0-alpha.861922ec0
1.3.10-0-alpha.2486f88c0

Package Sidebar

Install

npm i @apex-pub/convector-core-model

Weekly Downloads

76

Version

1.5.0

License

Apache-2.0

Unpacked Size

48.6 kB

Total Files

22

Last publish

Collaborators

  • akshaysood112
  • rodolfoleal