build-entities
build content class entity with properties getters/setter auto check type , hydrate methode
installation
- npm install build-entities --save-dev
- yarn add build-entities
usage:
const buildEntities = ; const buildParams = name: "Product" properties: name: "title" type: "string" name: "createAt" type: "date" relation: true name: 'user' type: 'User' ; ;
or synchrone call with:
// ... , const response = buildEntities ; if responsesuccess // ... , else // ... , // ... ,
client
:
you can generate doc block client with optional params // ... , const buildParams = name: "Product" properties: name: "title" type: "string" name: "createAt" type: "date" relation: true name: 'user' type: 'User' // for generate doc block optional params client: author: "S.Author <super.author@hotmail.com>" package: "build-entities-cli" version: "0.1.0" license: "BSD-2-CLAUSE" ; // ... ,
types list :
- string
- number
- date
- boolean
- array
- object
relation: true
or object name with relation: true type: "ObjectName" name: "objectName"