@salestrip/models
v1.1.0
Published
Share model management
Downloads
1
Keywords
Readme
@salestrip/models
STE models to access database
Install
npm i -S @salestrip/models
Usage
Some example uses are included below including some of the domain-specific behaviours. Please refer to the test suite for further examples.
Tenancy configurations model
const string = require('@salestrip/models')
const {tenancyConfigurationModel} = require('@salestrip/models')
const tcb = tenancyConfigurationModel.builder(
steDb,
env.ensure('TENANCY_CONFIGURATION_KEY')
)
// Update TenancyConfiguration of TENANCY_ID
await tcb.setTenancyConfiguration(TENANCY_ID, PAYLOAD)
// Read TenancyConfiguration of TENANCY_ID
const tenancyConfiguration = await tcb.getTenancyConfiguration(TENANCY_ID)
License
Copyright © 2021 SalesTrip Limited. All rights reserved.