feat: Cachable and date session model.

This commit is contained in:
Ahmed Bouhuolia
2020-05-20 06:51:34 +02:00
parent 10f636d2bc
commit 90dc83c70a
18 changed files with 638 additions and 200 deletions

View File

@@ -1,7 +1,9 @@
import { Model } from 'objection';
import { Model, mixin } from 'objection';
import TenantModel from '@/models/TenantModel';
import CachableQueryBuilder from '@/lib/Cachable/CachableQueryBuilder';
import CachableModel from '@/lib/Cachable/CachableModel';
export default class View extends TenantModel {
export default class View extends mixin(TenantModel, [CachableModel]) {
/**
* Table name.
*/
@@ -9,6 +11,13 @@ export default class View extends TenantModel {
return 'views';
}
/**
* Extend query builder model.
*/
static get QueryBuilder() {
return CachableQueryBuilder;
}
/**
* Relationship mapping.
*/