2017-12-12 20:41:02 +02:00
|
|
|
const { BaseModel } = require('lib/base-model.js');
|
|
|
|
const { BaseItem } = require('lib/models/base-item.js');
|
|
|
|
|
|
|
|
class MasterKey extends BaseItem {
|
|
|
|
|
|
|
|
static tableName() {
|
|
|
|
return 'master_keys';
|
|
|
|
}
|
|
|
|
|
|
|
|
static modelType() {
|
|
|
|
return BaseModel.TYPE_MASTER_KEY;
|
|
|
|
}
|
|
|
|
|
2017-12-13 20:57:40 +02:00
|
|
|
static encryptionSupported() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
static async serialize(item, type = null, shownKeys = null) {
|
|
|
|
let fieldNames = this.fieldNames();
|
|
|
|
fieldNames.push('type_');
|
|
|
|
return super.serialize(item, 'master_key', fieldNames);
|
|
|
|
}
|
|
|
|
|
2017-12-12 20:41:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = MasterKey;
|