building.js
461 Bytes
'use strict';
import Model from './model';
class Building extends Model {
constructor() {
super('buildings');
}
async updateState(id, state, version, pkgName) {
await this.update({
_id: id
}, {
$set: {
state: state,
version: version,
pkgName: pkgName,
updatedAt: new Date()
}
});
}
}
export default Building;