mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
WIP server side.
This commit is contained in:
14
server/src/models/Model.js
Normal file
14
server/src/models/Model.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Model } from 'objection';
|
||||
|
||||
export default class ModelBase extends Model {
|
||||
|
||||
static get collection() {
|
||||
return Array;
|
||||
}
|
||||
|
||||
static query(...args) {
|
||||
return super.query(...args).runAfter((result) => {
|
||||
return this.collection.from(result);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user