You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CoreID/app/models/vault/Entry.model.js

30 lines
646 B

const { Model } = require('flitter-orm')
class EntryModel extends Model {
static get services() {
return [...super.services, 'models']
}
static get schema() {
return {
active: { type: Boolean, default: true },
vault_id: String,
key: String,
locked_value: String,
}
}
async to_api() {
return {
id: this.id,
_id: this.id,
vault_id: this.vault_id,
key: this.key,
locked_value: this.locked_value,
active: this.active,
}
}
}
module.exports = exports = EntryModel