@krknet/lowmodel
v1.2.2
Published
BaseModel for LowDB
Downloads
3
Readme
LowModel
BaseModel for LowDB
Installing
npm i @krknet/lowmodel
Usage
const BaseModel = require('@krknet/lowmodel')
// the name of the LowDB Collection
const dbrep = 'accounts'
// Object Schema
const schema = {
id: null,
mail: null,
name: null,
role: null,
passphrase: null
}
module.exports = class Account extends BaseModel {
static get dbrep () { return db.get(dbrep) }
static get _modelSchema () { return schema }
}
Developing
Issue List: https://gitlab.com/KRKnetwork/lowmodel/issues