WIP Custom fields feature.

This commit is contained in:
Ahmed Bouhuolia
2020-01-26 21:14:21 +02:00
parent 77c67cc4cb
commit a97b527e8c
10 changed files with 326 additions and 75 deletions

View File

@@ -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;
}