mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
WIP Custom fields feature.
This commit is contained in:
@@ -10,6 +10,19 @@ export default class Option extends mixin(BaseModel, [mixin]) {
|
||||
return 'options';
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the model query.
|
||||
* @param {...any} args -
|
||||
*/
|
||||
static query(...args) {
|
||||
return super.query(...args).runAfter((result) => {
|
||||
if (result instanceof MetableCollection) {
|
||||
result.setModel(Option);
|
||||
}
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
static get collection() {
|
||||
return MetableCollection;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user