Virtual Key Property Model package, Functional to perform DB based on smartlocks and smartthing models collections available.
-
Install
vk-model_sql-property
npm install @virtualkey/vk-model_sql-property
-
Import/Require the package.
const propertyModels = require('vk-model_sql-property')
-
Initialize an object of the integration account model package.
const propertyModelsObj = new propertyModels();
-
Now just use object as per the requirement using the dot notation followed by function name.
propertyModelsObj.[method-name]
-
getDevicesForProperty
Function to retrieve all devices for a particular property by its unique identifier (exclude deleted). -
getDevicesDetailsByIdAndUserId
Function to retrieve device details by virtulKey unique identifier (exclude deleted). -
getDevicesDetailsByLockId
Function to retrieve device details by device's unique identifier (exclude deleted).